Re: Other options beside seek



Jeff Howard wrote:

I am using a server side cursor for an Access database and for
inserts into the database I am using a simple query returning the
primary key field(s) to determine if the record already exists or
not. This allows me to avoid using seek which forces me to re-index
based upon the primary key field(s) so that I do not have to change
the index back and forth and then from my query results I can either
do a AdoDataSet1.insert or edit. The nice thing about doing it this
way is that it also set the database pointer on the modified or
inserted record.

Sorry for the long introduction but I would like to know if there is
a quicker way then locate, since this does not care what index is
active, to go out and search or query as the user hits keystrokes
into an edit field and then to move the database pointer to an exact
match or at least the closest match? I know that the RecNo property
is really fast but I am not quite sure how get a record number
outside of seek or locate.

Thanks!

not really sure that is a good idea because it involves a lot of
movements. A workaround could be to use the Filter property, although I
am not sure that would be too fast either.

--
Best regards :)

Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
--
Contribute to the Indy Docs project: http://docs.indyproject.org
--
In order to contact me remove the -nospam

.



Relevant Pages

  • Re: Very slow query
    ... indexed for all the secondary tables, only the primary key is indexed). ... create a new blank database and immediately turn OFF the Name ... With 14 secondary tables or less, my query runs in 1 sec or less. ... in forms, base the form on the primary data table, and use combobox or ...
    (microsoft.public.access.queries)
  • Re: Query to merge
    ... Thanks for that insite - I am sure that the additional customers (that would ... simply build your query to give you all records from the one, ... Say it was a customer database. ... customers with the same primary key. ...
    (microsoft.public.access.queries)
  • Re: Very slow query
    ... indexed for all the secondary tables, only the primary key is indexed). ... create a new blank database and immediately turn OFF the Name ... With 14 secondary tables or less, my query runs in 1 sec or less. ... in reports, base the report on the type of query described above ...
    (microsoft.public.access.queries)
  • Re: Is this bad design?
    ... application which is making heavy use of an Access database. ... design but there might be good reasons for doing things this ... Tables with a generated primary key i.e. an id where a number ... Relations can be created on the fly in the query builder and/or ...
    (comp.databases.ms-access)
  • Re: problem using identity column as primary key
    ... >> I am thinking of creating an identity column to use it as primary key ... More and more programmers who have absolutely no database training are ... the gap in the sequence is not filled in and the sequence ... vin CHARNOT NULL REFERENCES Motorpool); ...
    (microsoft.public.sqlserver.programming)