DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Rowset not bookmarkable! NEW ISSUE DataGrid Control

  1. #1
    Join Date
    Mar 2008
    Posts
    5

    Cool Rowset not bookmarkable! NEW ISSUE DataGrid Control

    I have searched the forums and none of those solutions have fixed my problem. Also, none have been like my situation. Here it goes:

    I am connecting to a remote sql server via ADO, i was using ADORecordSet.Open "SQL Query", AdoC1 fine, until I tried to run a select query which took too long, and i got a time out error. To correct this, I found I needed to use a command object and

    cmd.CommandTimeout = 120
    rs.CursorLocation = adUseClient
    set rs = cmd.execute

    but then when I try to
    set dg1.datasource = rs

    I get the "Rowset not bookmarkable" error.

    here is the code:
    Code:
    Set grs = New ADODB.Recordset
    
    Dim cmd As New ADODB.Command
    
    
    cmd.ActiveConnection = db
    cmd.CommandTimeout = 120
    cmd.CommandType = adCmdText
    cmd.CommandText = txtSQL.Text  'SELECT * FROM Project;'
    
    grs.CursorLocation = adUseClient   'with or without doesnt matter
    Set grs = cmd.Execute
    grs.MoveFirst   'with or without doesnt matter
    
    
    Set d1.DataSource = grs 'ERROR COMES HERE
    d1.Refresh
    please help ^_^ thank you

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    What is d1?

  3. #3
    Join Date
    Mar 2008
    Posts
    5
    d1 = Datagrid control sorry ^_^

Similar Threads

  1. Adding DataGrid to a composite control
    By V Lakshmi Narasimhan in forum ASP.NET
    Replies: 1
    Last Post: 07-19-2006, 01:55 PM
  2. how to control textbox using datagrid
    By whygh in forum VB Classic
    Replies: 1
    Last Post: 06-07-2005, 06:27 PM
  3. Replies: 5
    Last Post: 05-04-2005, 12:37 PM
  4. DataGrid Web control question
    By Ind- in forum ASP.NET
    Replies: 0
    Last Post: 02-09-2001, 01:02 PM
  5. Binding a dropdownlist control within a datagrid control
    By David Livingston in forum ASP.NET
    Replies: 2
    Last Post: 01-26-2001, 04:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center