Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Michael Farr
Wed, 06 Oct 1999 00:00
BDE Error (probably a bug in something)
Author: Michael Farr
Date: Wed, 06 Oct 1999 00:00
Date: Wed, 06 Oct 1999 00:00
20 lines
1345 bytes
1345 bytes
This looks very much like a bug to me. (database is MySQL database through MyODBC) I have connected a TDBGrid using a _live_ TQuery via a TDatasource (nothing fancy) One of the Fields returned by the TQuery is a double I can edit this Column in the Grid as much as I like ... until I make it negative. As soon as it goes negative I cant edit it again ... it gives me the: "Another user changed the record" line ... most upsetting. I can edit all the other records fine, just not the negative ones. I went to the trouble of making a blank form with these components, just to make sure it wasnt any of my other code doing this. Restarting the server, my workstation and running around in circles does not fix this problem. Please help. (Hope its not really a bug)
Re: BDE Error (probably a bug in something)
Author: Jerry Bloomfield (TeamB)
Date: Thu, 07 Oct 1999 00:00
Date: Thu, 07 Oct 1999 00:00
40 lines
2590 bytes
2590 bytes
On Wed, 06 Oct 1999 20:01:08 +1000, Michael Farr <farrm@lion.cs.latrobe.edu.au> wrote: >One of the Fields returned by the TQuery is a double > >I can edit this Column in the Grid as much as I like ... until I make it >negative. As soon as it goes negative I cant edit it again ... it gives >me the: "Another user changed the record" line ... most upsetting. I >can edit all the other records fine, just not the negative ones. I went >to the trouble of making a blank form with these components, just to >make sure it wasnt any of my other code doing this. Restarting the >server, my workstation and running around in circles does not fix this >problem. > >(Hope its not really a bug) Regretfully, this is worse than a bug. It is a design flaw... What appears to be happening to you is that the interface to your database and the database itself are not handling the floating point "rounding" in the same manner. In the end it causes the BDE to not be able to locate the exact record it is looking for (due to the floating point issues) and it can only assume that since you read the record and it is no longer there, that someone else has changed it. In fact, the record is still there, it is just that the floating point comparisons do not match-up exactly, and therefore it doesn't look like it is still there... Some possible work-arounds would be to not use any floating point fields in any of your records. Since you probably can't go this drastic, you could go to not using them in your record key fields, then performing your edits based on the key fields only (by setting the UpdateMode property). Other than those options, you don't have much hope, unless you can get an updated driver which handles the floating point "rounding" issues a bit better... Jerry Bloomfield (TeamB) -- Jerry Bloomfield JersWork@wwa.com Proud Member of Borland's TeamB "We'll do anything if you don't pay us."
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