I have a VB6 application which uses a Access 2000 database. I want to be able to connect to a SQL-Server table (can't link into Access DB, as SQL-Server table has too many indexes, which I can't delete).
I am accessing the SQL-Server table using the following code.
Dim rsFutures As ADODB.Recordset
Set Conn = New ADODB.Connection
Conn.Open strCnxn
Set rsFutures = New ADODB.Recordset
rsFutures.CursorType = adOpenKeyset
rsFutures.LockType = adLockOptimistic
rsFutures.Open "futures", Conn, , , adCmdTable
rsFutures.MoveFirst
' find/seek rsFutures!ticket="20060405ABC" ????
Questions.
1. How do I open a index for this SQL-Server table.
2. I want to be to search the table based upon a search value. FIND is taking far too long, and if I can't use SEEK, then I could run a query, but what code do I need to add to create a query which retrieves data from recordset rsFutures based upon my search criteria ?
Any and all responses will be greatly appreciated, as I need urgently to replace slowness of the FIND.
Regards,
Moben.
I am accessing the SQL-Server table using the following code.
Dim rsFutures As ADODB.Recordset
Set Conn = New ADODB.Connection
Conn.Open strCnxn
Set rsFutures = New ADODB.Recordset
rsFutures.CursorType = adOpenKeyset
rsFutures.LockType = adLockOptimistic
rsFutures.Open "futures", Conn, , , adCmdTable
rsFutures.MoveFirst
' find/seek rsFutures!ticket="20060405ABC" ????
Questions.
1. How do I open a index for this SQL-Server table.
2. I want to be to search the table based upon a search value. FIND is taking far too long, and if I can't use SEEK, then I could run a query, but what code do I need to add to create a query which retrieves data from recordset rsFutures based upon my search criteria ?
Any and all responses will be greatly appreciated, as I need urgently to replace slowness of the FIND.
Regards,
Moben.