Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when posting to database

Status
Not open for further replies.

Jonah86

Programmer
Dec 11, 2003
152
US
I'm having a problem, in all of my programs, that is beginning to rear it's ugly head too often. In a program that used ".edit" and ".post" commands to update a record I sometimes get an error saying "coudn't preform the edit because another user changed the record". This normally happens if, for some reason, you go into edit mode, don't change anything and then try to post. It's not an actual case of another user changing anything, as it happens when no one else is in the DB.

I'm not sure if this is a Delphi error or a MySQL error, but I can't duplicate the results by directly editing the MySQL DB so I assume it's a Delphi problem.

I'm using Delphi 7, and BDE to access the DB.
 
The best way to access MySQL databases from Delphi 7 is to use dbExpress.

If you are using the BDE then it must be converting the .edit and .post commands into SQL as I am sure that is the only way of updating records in a MySQL table.

Are you using ODBC?


Andrew
Hampshire, UK
 
Yes, I'm using ODBC. I tried once to switch any new programs I make to dbexpress, but I didn't have much luck, and never really have the time to experiment at work (and don't have delphi at home). Would it be better, do you think, to just use SQL statement instead of the pre-defined functions? It wouldn't be hard at all to just make an update query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top