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
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
ADO - record level access....speed
Collapse
X
-
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 syntaxIf 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.
-
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
-
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
Comment