which one is better, why, whats the difference
Code:.Open "SELECT * FROM LoggedUsers", MeterInfo
OR
.Open "LoggedUsers", MeterInfo, , , adCmdTable
Printable View
which one is better, why, whats the difference
Code:.Open "SELECT * FROM LoggedUsers", MeterInfo
OR
.Open "LoggedUsers", MeterInfo, , , adCmdTable
In essence there isn't really any difference between the two methods. both will open recordsets containing all the records in the table. The real difference is in their use, using a select statement you can be more selective. Also with an SQL query you can retrieve data from more than one table.
It is also best practise to pass all the parameters and specify a cursor location and lock type.