Punchinello
Programmer
Can anyone recommend which of the following techniques (or any other) is better, stronger, faster? Data resides on a LAN in SQL Server and filering would be done on indexed field(s) only.
1. Opening a recordset using SQL string:
strSQL = "SELECT * FROM Table1 WHERE KeyValue=" & intValue
rstTable1.Open strSQL, cnxMain, ...
2. Opening a recordset using filter:
rstTable1.Open "Table1", cnxMain, ...
rstTable1.Filter = "KeyValue=" & intValue
And, no, this is not a test -- I am writing an app for a client who already has a big database but I only get a little itty-bitty database for my development environment so I cannot really optimize for speed.
1. Opening a recordset using SQL string:
strSQL = "SELECT * FROM Table1 WHERE KeyValue=" & intValue
rstTable1.Open strSQL, cnxMain, ...
2. Opening a recordset using filter:
rstTable1.Open "Table1", cnxMain, ...
rstTable1.Filter = "KeyValue=" & intValue
And, no, this is not a test -- I am writing an app for a client who already has a big database but I only get a little itty-bitty database for my development environment so I cannot really optimize for speed.