Link to home
Start Free TrialLog in
Avatar of NamCit
NamCit

asked on

Automatic Posting in TDBGRID



Dear Advisor !

I use D5 + SQL7

When i change data in TDBGRID (with AutoEdit = True in DataSource and TADOTable), and after move pont to other record in TDBGRID

The error :

Project sample.exe raised exception class EOLEException with message : "Key column information is insufficient or incorrect. Too many rows were effected by update"

But after deleting all data in SQL, and run application again. Inputing with no error

It only occurs rarely

How could i do for this problem

Thanks for all
Avatar of marcoszorrilla
marcoszorrilla

have You a primary key for this table. Perhaps this is the problem.
Best Regards
Marcos.
Avatar of NamCit

ASKER


There is not any key or index field.

I also get this errror when i modified data on SQL Enteprise Manager , when i <open Table>, <return all rows> , and change data in serveral records
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NamCit

ASKER


Thanks. I use ADO
On any dataset driving a data aware grid, I add the following line to the BeforeScroll event to handle unwanted posting on movement of pointer.

if (DataSet.State in [dsEdit, dsInsert]) then
      SysUtils.Abort;



Avatar of NamCit

ASKER


Do you have any easy ways