Results 1 to 4 of 4

Thread: ADO Commands

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Unhappy

    I have a stored procedure in SQL Server that returns a recordset.

    In VB, I have an ADO command that executes the stored procedure to retrieve the recordset.

    So far, so good.

    The problem is that the recordset is Cursor Type 'adOpenForwardOnly'.

    I want anything other than a 'forward only' recordset (like static or something) but I can't change it.

    Any ideas?
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    Member
    Join Date
    Jan 2001
    Location
    Richmond, VA
    Posts
    59
    Set adoSellLotsRS = New Recordset
    With adoSellLotsRS
    .ActiveConnection = gConn
    .LockType = adOpenDynamic
    .CursorLocation = adUseClient
    .CursorType = adOpenStatic
    .Source = "Exec sp_GetLots " & iTradeId
    .Open
    End With

    This works for me. Whay ndoesn't it work for you?
    Any error messages?

  3. #3
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    adOpenStatic opens a Server Side cursor!

    Simon,

    It may be that the sp itself has a forward only cursor.

    Have you got the code for that?

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  4. #4

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Thumbs up Well...

    PaulW, As mentioned in another thread, I have found the solution.

    Infact, it is very similar to FMCAR10's solution.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width