CursorLocation playing havoc with search attempts!!

From: jason (jason_at_no-replies.com)
Date: 11/28/03


Date: 27 Nov 2003 20:03:36 -0700


Hi,

In a customer search feature in our software the user types in first name or last name, etc and we build an SQL statement similar to "select * from cust_table where first_name like "' + edit1.text + '%'; executed via a TADOQuery component.

However, as the queries are often executed on a customer table with greater then 50,000 records we use a 2 step process to show the entire customer records. eg

execute SQL query to present a list of likely customer records.

then when user selects the record they want from a DBGrid, do a TADOTable.Seek on the customer table to locate the record and display it.

This approach seems logical enough until we get to the issue of cursor locations. To execute a Seek as you know you need a cursorlocation of clUseServer.

If we return the cursor location of the table to clUseClient, the TADOTable.RecNo is different, even if the index remains the same????

We can't abandon the Seek because a Locate is far too slow.

Any ideas on how we can use a Seek on the table to find the record we want, then change the cursor location to clUseClient before we display the data and still record the position of the record we want??

We've tried bookmarks, but the bookmark is not preserved when you need to close the table connection to reset the cursor location.

Heeellllppp!!!



Relevant Pages

  • Re: Trying to automate data entry in word
    ... When the user opens the document, they have to know to do ctrl-A then F9. ... The ASK fields should execute and all REFs that refer to their bookmarks should then be updated. ... I've never actually done it that way (I think it's better to use a userform to set either bookmarks, document variables, or document properties) and it requires more user knowledge than I'd prefer to rely on, but it doesn't need any macros and is perhaps worth a try. ... the user types in just the once the customer name and for the document to ...
    (microsoft.public.word.docmanagement)
  • Re: Like query slow on number field
    ... FROM CUSTOMER ... SearchField is any indexed string/text field, ... 4+ seconds to execute. ... Yes, indexed with no duplicates (although for string fields, indexed ...
    (microsoft.public.access.queries)
  • Re: alter column name
    ... first it allows my customer to execute the stored procedure in the ... query tool and get the table displayed as a grid in a simple format. ... I can bring the table into an existing asp page. ... When the customer is done reviewing the table, ...
    (microsoft.public.sqlserver.programming)
  • declaration of functions return pointers
    ... I have executed the below program whichm does not accept to execute ... int customer_no; ... struct customer_record customer; ... char another_customer; ...
    (comp.lang.cpp)
  • Re: 5 Line Assembler Demos
    ... and have a single op code execute the demo of your ... What is your domain or customer number?" ... Paul: The best way is to limit the size of the executable (and thus any ...
    (comp.sys.acorn.programmer)