DAO to ADO Recordset Options

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hello,

I am in the process, and also a 'newbie' to ADO/DAO programming, of
converting our backend database to SQL server and linking tables to a
front end Access mde file (with the VBA automation code and forms). In

doing so, and after reserching the many postings, it seems that I need
to migrate much of my DAO code to ADO. Mainly, it seems that this
greatly improves performance. However, although I have migrated much
code, from DAO to ADO, there is still a performance hit. From the
research on these forums I have several options (with the objective of
opening a recordset for viewing, adding/deleting records), from which I

wish to ask advice from the experts as to which choice is optimal:


1.) Use strict SQL commands vs. ADO for retrieving data.
2.) Don't migrate to ADO, continue using DAO.
3.) Use the following method for opening a recordset:


Dim rst As New ADODB.Recordset 'New for SQL server
Set db = CurrentProject.Connection
sqlCode = "SELECT * FROM [PRODUCTCONFIGURATIONS]"
rst.Open sqlCode, db, adOpenStaticOnly, adLockOptimistic 'New for SQL

server


4.) Use adForwardOnly vs. adOpenStaticOnly for retrieving data only.
Also, becuse I will be opening multiple RS. I need to close and reopen

each recordset to avoid errors???


5.) Imbeding some sort of SQL codeing in the Open RecordSet command.
Although, if this can be done is there an example.


6.) Use another type of connection vs. Set db =
CurrentProject.Connection?


7.) Other suggestions???


Any help would be appreciated,


Thanks

.



Relevant Pages

  • Re: How does ADO 2 update a SQL stored procedure recordset?
    ... > Generally when I want to use ADO 2 to update a recordset based on a MSSQL ... > call a second stored procedure to perform the update. ... Well if you have SELECTed the columns in the recordset that form the Primary ... You are running SQL Server. ...
    (microsoft.public.data.ado)
  • Re: Problem with find method
    ... I am sorry that this is not my original question. ... SQL server when the field property is set to not allow NULL. ... Does anyone know whether this is a bug in ADO? ... >> My recordset does not contain only user name. ...
    (microsoft.public.vb.database.ado)
  • Re: ADO Shape and Subqueries
    ... > the second recordset, since you suggest making two recordsets insted of ... I have no idea if it is a limitaiton of the provider or SQL Server or ADO. ... That means the programmer asking for help here has got to be prepared to do ...
    (microsoft.public.data.ado)
  • Tempdb Permissions Problems
    ... we're using SQL Server 2000 on Windows Server 2003 and XP Pro. ... an ADO Recordset, the Recordset field for the primary key column will not ... column information for updating or refreshing". ... This must be because ADO ...
    (microsoft.public.sqlserver.programming)
  • Re: Smartest way toa add records manually
    ... class modules to represent tables, collections, etc., and started isolating ... we've transitioned from Access as a back end to SQL Server as ... Then I discovered why I transitioned to ADO. ...
    (microsoft.public.access.adp.sqlserver)