I am using A03 to connect to SQL Server Express 2012 using ADO.
Please correct me if I am wrong:
It appears that an ADO Recordset should be used for READing and a Command should be used to INSERT, UPDATE, DELETE to preferably call a Stored Procedure.
To read say 1 million records from the SQL Server we can use an ADO Recordset, whose default settings use a Firehose cursor. These settings are as follows:
and we can use the following to display the data on a form
Is it advisable to store the data into a FE temp table or should the user work from the recordset?
Also, when using a Command instead of a recordset, should
CursorLocation = adUseClient?
Regards,
John
Please correct me if I am wrong:
It appears that an ADO Recordset should be used for READing and a Command should be used to INSERT, UPDATE, DELETE to preferably call a Stored Procedure.
To read say 1 million records from the SQL Server we can use an ADO Recordset, whose default settings use a Firehose cursor. These settings are as follows:
Code:
[/SIZE][/FONT][/COLOR]
[COLOR=#333333][FONT=Arial][SIZE=2]CursorType = adForwardOnly [/SIZE][/FONT][/COLOR]
[COLOR=#333333][FONT=Arial][SIZE=2]CursorLocation = adUseServer [/SIZE][/FONT][/COLOR]
[COLOR=#333333][FONT=Arial][SIZE=2]LockType = adLockReadOnly [/SIZE][/FONT][/COLOR]
[COLOR=#333333][FONT=Arial][SIZE=2]CacheSize = 1 [/SIZE][/FONT][/COLOR]
[FONT=Arial][SIZE=2]
Code:
[/FONT]
[FONT=Arial]rst.Open "tblClient", con, adOpenForwardOnly, adLockOptimistic[/FONT]
[FONT=Arial]Set Me.Recordset = rst[/FONT]
[FONT=Arial]
Is it advisable to store the data into a FE temp table or should the user work from the recordset?
Also, when using a Command instead of a recordset, should
CursorLocation = adUseClient?
Regards,
John