Results 1 to 2 of 2

Thread: Problems with Recordset

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 1999
    Location
    Belfast
    Posts
    254
    Hi,
    I had a problem last week with a component returning a recordset to a Vis InterDev page, and not having all the recordset properties exposed. I emailed and got a response pointing to the cursortype of the returned recordset ( thanks clunietp ). However when I change the cursortype in the component ( to adopendynamic or anything else ) it fails to return the correct recordcount ( returns -1 pointing STILL to cursortype). When I check the cursot type it is set to 0, which is correct.

    Is the code below the most effective method of setting the cursor type? I cannot use the recordset.open syntax as this is a parameterized command query.

    Can somebody point me in the right direction?

    Set lrs_getOpenCalls = New ADODB.Recordset
    lrs_getOpenCalls.CursorType = adOpenDynamic
    Set lrs_getOpenCalls = comm_getOpenCalls.Execute
    MsgBox lrs_getOpenCalls.RecordCount
    Set get_Open_Calls = lrs_getOpenCalls


    Thanks in advance

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696

    Talking

    Hi lenin

    Try opening the recordset using the magic number, 3
    This opens the recordset up so you can edit, delete.

    myrecordset.open strsql,objcon,3

    It also returns the record count. I cant remember which adOpen it relates to but it isn't one of the supplied by interdev.

    Hope this helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

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