Re: Trouble with DAO "SEEK" in converting application to SQL Express back end.



"Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS
PART IN CAPS> wrote in news:bDUWf.202692$H%4.69991@pd7tw2no:

I have an application that I'm converting to Access 2003 and SQL
Server 2005 Express. The application uses extensive use of DAO
and the SEEK method on indexes. I'm having an issue when the
recordset opens a table. When I write

Set rst = db.OpenRecordset("MyTable",dbOpenTable, dbReadOnly)

I get an error. I believe it's invalid operation or invalid
parameter, I'm not in front of the application at the moment, but
will let you know if it's important.

When I remove the dbOpenTable, it works but I can't use the SEEK
method on the index.

Is SEEK a Jet-only operation? Given that it's based on indexes, I'd
think that it would be.

I don't think there are very many situations at all where SEEK is
justified at all. Either filter your recordset or use .FindFirst.
The latter may very well be 10 times slower than SEEK, but that
would only matter if you're doing loops that require hundreds of
thousands of operations that reposition the current record pointer.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.



Relevant Pages

  • Re: DAO MUCH faster than ADO in this test
    ... DAO is well-known to be faster than ADO. ... Of course the DAO loop ran faster than the SQL loop; ... advantage of a table-type recordset, which only works on local tables. ... Dim starttime As Single, finishtime As Single ...
    (microsoft.public.access.modulesdaovba)
  • Re: Is it possible to link via ADODB from an Access 2K .mdb file?
    ... to decide if we want to rewrite it all by just allowing record locking in DAO ... UPDATEs instead of recordset updates - do you mean I should use ADO commands ... recordset based on SQL Server data, ...
    (microsoft.public.sqlserver.clients)
  • Re: Me.Recordset -> DoCmd.RunSQL "UPDATE ...............
    ... DAO is the preferred library for interacting with Jet database engine. ... primary method by which data are manipulated in ACCESS databases since ... >> the form based on DAO recordset SQL statement: ... >> form's Recordsource to the SQL statement itself ("SELECT * FROM ...
    (microsoft.public.access.modulesdaovba)
  • Re: Datensatz in Recordset finden
    ... Dein Hinweis auf .FindFirst lässt nur vermuten, dass Du mit DAO arbeitest. ... > ich brauche ja mein Recordset Objekt so wie es ist. ... statt mit DAO mit ADO zu arbeiten. ... > Ansprechpartner. ...
    (microsoft.public.de.vb.datenbank)
  • Re: convert query into xml-file
    ... You can use both DAO and ADO in the same Access application. ... e.g. "Dim rst AS DAO.Recordset" or "Dim rst As ... ADODB.Recordset" rather than just "Dim rst As Recordset". ...
    (microsoft.public.access.queries)