Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

ADO - record level access....speed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ADO - record level access....speed

    If you move the code to create the ADO connection to the Load event for the form and only recreate the recordset object as required it should leave the connection opened and greatly improve the data access speed. mf

  • #2
    ADO - record level access....speed

    How do I recreate the record set? I'm using rst_Override.Open strSql, cnn_Override, adOpenKeyset for the SQL selection which gives me an error because the connection is open. I don't know the syntax
    If you move the code to create the ADO connection to the Load event >for the form and only recreate the recordset object as required it >should leave the connection opened and greatly improve the data >access speed.

    Comment


    • #3
      ADO - record level access....speed

      As long as you close the recordset object before you run a new OPEN command you shouldn't get this error. One connection object can support multiple recordset objects. It can even support multiple concurrent recordset objects as long as they have different names (ie rst1, rst2 etc...) mf

      Comment


      • #4
        ADO - record level access....speed

        From a VB 6 program I am testing to see if a record exists in an AS400 database. The following code works but it is sloooooow. I think that reopening the connection every time is slowing it down. How do I keep the connection open and just change the SQL?....or is there a better way to test for the existence of a record. THANKS, BILL
        Code

        Comment


        • #5
          ADO - record level access....speed

          Thanks, it works fine now. I thought the recordset was being closed every time but it wasn't.

          Comment

          Working...
          X