CursorLocation playing havoc with search attempts!!
From: jason (jason_at_no-replies.com)
Date: 11/28/03
- Next message: Brian Bushay TeamB: "Re: "Key column information in insufficient or incorrect. Too many rows were affected by update""
- Previous message: jason: "Re: Catastrophic failure when connecting to MySQL using ADO"
- Next in thread: Mike Collier: "Re: CursorLocation playing havoc with search attempts!!"
- Reply: Mike Collier: "Re: CursorLocation playing havoc with search attempts!!"
- Reply: Brian Bushay TeamB: "Re: CursorLocation playing havoc with search attempts!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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!!!
- Next message: Brian Bushay TeamB: "Re: "Key column information in insufficient or incorrect. Too many rows were affected by update""
- Previous message: jason: "Re: Catastrophic failure when connecting to MySQL using ADO"
- Next in thread: Mike Collier: "Re: CursorLocation playing havoc with search attempts!!"
- Reply: Mike Collier: "Re: CursorLocation playing havoc with search attempts!!"
- Reply: Brian Bushay TeamB: "Re: CursorLocation playing havoc with search attempts!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|