Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    Leics, England
    Posts
    5

    Angry Unanswered: MoveFirst re-runs procedure

    Okay this has had me stumped for a while.... I've now sussed that myRecSet.MoveFirst can re-run the query!! Eh?

    My SQL is "EXEC sp_Proc 'YYYYMM'" This proc will create records in a table if they don't exist, and return a msg. If the records already exist it returns a diff msg. Simple!

    I create the recordset in the fashion of myRS = myDB.Execute (mySQL) though I've tried myRs.Open mySql, myDB, myRSType (with various recordset types) with the same result.

    I run the query and prior to doing a MoveFirst the 1 line recordset has the expected result (create). When I do a MoveFirst the recordset has the 'existing' message.

    Now I know the MoveFirst is not actually required (but it's in a lot of our old systems), but I can't see why this should happen. I've got a big dent in me head now from bashing it against the desk. Any comments or ideas would be most welcome before I throttle the soft toy on my desk!

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    Have you tried this with pubs or northwind databases in sql server ? Post your code and sp.

Posting Permissions

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