SQL Server Performance

ADO SQL Server 2012

Discussion in 'ALL SQL SERVER QUESTIONS' started by JohnPapa, Dec 28, 2012.

  1. JohnPapa New Member

    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:

    Code:
    CursorType = adForwardOnly CursorLocation = adUseServer LockType = adLockReadOnly CacheSize = 1
    and we can use the following to display the data on a form

    Code:
    rst.Open "tblClient", con, adOpenForwardOnly, adLockOptimistic Set Me.Recordset = rst

    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

Share This Page