Delphi Ado Query Sort Multiple
we have migrated a Delphi Project(Banking Application) from BDE to ADO and we have kept all the default properties as is and while unit testing there are issues.
Apr 20, 2017 How to choose Delphi ADO Cursor location and Cursor Type. Ask Question 1. We have migrated a Delphi Project(Banking Application) from BDE to ADO and we have kept all the default properties as is and while unit testing there are issues. Newly added records are not on logical position in DBGrid when sorting by Multiple-Field Index. Searching and sorting tables and query result sets is accomplished through several methods of the TDBISAMTable and TDBISAMQuery components. The basic searching methods for tables (not query result sets) include the FindKey, FindNearest, SetKey, EditKey, GotoKey, and GotoNearest methods. The KeyFieldCount property is used with the SetKey and EditKey methods to control searching using the.
One issue is 'Row cannot be located for updating. Some values may have been changed since it was last read'
the Issue is coming while updating a table. Table employee is having Update trigger and it is updating same table(Employee) based on some checks.whether trigger updates the table or not system is throwing above error.
Most Suggested Solution : ADODataSet1.Properties['Update Criteria'].value :=adCriteriaKey;
and it didnt work.
After googling we have come to know there are some properties like Cursor location and Cursor Type which are important while working with ADO.
we have just changed Cursor Location to clUseServer from clUseClient and it started working(magic) and we dont know why it is working.
now we are super confued what cursor location or Cursor type to use.
About My Application:
1) List view or DBGrid to show the records to user.
2) we are using data aware controls(more controls).
3) there are lots of inserts , updates and deletions
3) there are around 1000 users who uses this application.
4) Same user can work on same screen/Record.
after going through Client-Side Cursors Versus Server-Side Cursors we are planning to for Server Side cursors.
kobik1 Answer
Delphi Ado Query Sort Multiple Function
First of all I suggest you to forget the ADO and use FireDAC (or UniDAC)
This problem occurs when you are using triggers or sometimes you set the default values for fields, because ADO can't find the Record you want to update it in Client-Side
Access Query Sort
If you set the cursor location to Server-Side you will lose some good feathers like Local Sorting, Local Filtering and Local Indexes, your records will not keep on the Memory and speed of your DataSet will be decreased, Server-Side location also can have bad effects on Server's resources
What RDBMS you are using ?
You can create a Stored-Procedure and call it for updating and keep using the Client-Side Cursor Location
Cursor-Location must be combined with a proper Cursor-Type to get a good result, this article will help you :