Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Walter Sciotti
Mon, 06 Dec 1999 00:00
TProvider - TClientDataSet database update problem
Author: Walter Sciotti
Date: Mon, 06 Dec 1999 00:00
Date: Mon, 06 Dec 1999 00:00
17 lines
1328 bytes
1328 bytes
I have a TQuery on my server with an associated TUpdateSQL object to handle updates to existing records. This exported via a TProvider. A TClientDataSet on the client connects to it. The problem is this: I can read the data and display it, no problem. But when I make a change to the data and call ApplyUpdates(-1) on the TClientDataSet I get an exception: "Record changed by another user." But it hasn't been changed and the record remains unchanged in the database. Other times no exception is thrown, but the data is still unchanged. And, rarely, the data actually gets updated without any exception being thrown. There is nothing wrong with the SQL statements involved. Other TQuery's, etc., on the same interface on the same server work fine: they fetch and update data just like they're supposed to. Any ideas?
Re: TProvider - TClientDataSet database update problem
Author: John Graham
Date: Thu, 16 Dec 1999 00:00
Date: Thu, 16 Dec 1999 00:00
34 lines
2190 bytes
2190 bytes
Walter, I ran into this problem recently. The table I was trying to update, which is also updated by other applications, had a TimeDate field containing milliseconds. I used a TDbEdit control to enter a new date. When I attempted to update the table field I got the same error you're getting. Our solution was to remove the milliseconds from all rows in that table and modify the routine(s) that wrote to that field. This may not exactly match your problem, but you should see what fields are giving you difficulty in the error dialog. Check the actual contents of the field(s) in the table to see what's there, then check what your code is actually supplying to the field(s). Regards, John Walter Sciotti wrote: > I have a TQuery on my server with an associated TUpdateSQL object to handle > updates to existing records. This exported via a TProvider. A TClientDataSet > on the client connects to it. > > The problem is this: I can read the data and display it, no problem. But > when I make a change to the data and call ApplyUpdates(-1) on the > TClientDataSet I get an exception: "Record changed by another user." But it > hasn't been changed and the record remains unchanged in the database. > > Other times no exception is thrown, but the data is still unchanged. And, > rarely, the data actually gets updated without any exception being thrown. > > There is nothing wrong with the SQL statements involved. Other TQuery's, > etc., on the same interface on the same server work fine: they fetch and > update data just like they're supposed to. > > Any ideas?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads