Board index » delphi » SQL Server Error: cannot update erased record
Mikael
Delphi Developer |
Mikael
Delphi Developer |
SQL Server Error: cannot update erased record2006-01-16 06:11:21 PM delphi277 Can anyone explain this error msg? SQL Server Error: cannot update erased record |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-16 07:57:16 PM
Re:SQL Server Error: cannot update erased record
Mikael writes:
QuoteCan anyone explain this error msg? changing to InterBase at the earliest possible convenience. :) Seriously, if you need help with MS SQL Server, then you should probably ask in borland.public.delphi.database.sqlservers. -- Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Borland newsgroup denizen Sergio Gonzalez has a new CD of Irish music out, and it is good: tinyurl.com/7hgfr |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-16 09:21:55 PM
Re:SQL Server Error: cannot update erased record
The message you posted is not an InterBase message (IB would never say
"SQL Server Error".) What tool is producing that message? Please give much more information about what you are doing. -- Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Borland newsgroup denizen Sergio Gonzalez has a new CD of Irish music out, and it is good: tinyurl.com/7hgfr |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-16 09:56:34 PM
Re:SQL Server Error: cannot update erased record
Mikael writes:
Quotethis is the complete msg i generate when i get an exception. You need to figure out what the thread is doing when the error is raised. A full call stack would probably help as that should at least give you the query that is running. -- Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt your DBs! Open Edition users, get 6.0.1.6 from mers.com |
Mikael
Delphi Developer |
2006-01-16 10:19:30 PM
Re:SQL Server Error: cannot update erased record
I'm using Interbase!! 7.5.1
/Mikael "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43cb982c$XXXX@XXXXX.COM... QuoteMikael writes: |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-16 10:27:45 PM
Re:SQL Server Error: cannot update erased record
Mikael writes:
QuoteIf it is not from interbase it must come from Delphi. You can see I QuoteHow do I create a call stack i in Delphi 7? But you can not really see your locals after an exception is raised so to log the SQL the best way to do it is within the exception handling code itself. You may have to wrap the line of code which is executing the statement (you'll get this from the first call stack) with a try/except and re-raise a custom exception which includes the SQL as a property. -- Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Please read and follow Borland's rules for the user of their server: support.borland.com/entry.jspa |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-16 10:27:58 PM
Re:SQL Server Error: cannot update erased record
Mikael writes:
QuoteIs this q better handled in DBExpress group? Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz All the great TeamB service you've come to expect plus (New!) Irish Tin Whistle tips: learningtowhistle.blogspot.com |
Mikael
Delphi Developer |
2006-01-16 10:43:12 PM
Re:SQL Server Error: cannot update erased record
My program is a threaded Service that stores Xmlfiles into table(s)
in a Interbase database. The service is a Delphi 7 program. I'm using DBExpress components. this is the complete msg i generate when i get an exception. Msg:='ThreadID: ' + IntToStr(TID) + ', FileName: ' + XMLTransformProvider1.XMLDataFile + #10 + 'Unexpeted error in StoreTUnits: ' + #10 + e.message + #10; this is the output ThreadID: 3536, FileName: E:\Projekt\Ean\GTItems\Batch\Infiler\MNXML\Files\3879638.xml Unexpeted error in StoreTUnits: SQL Server Error: cannot update erased record "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43cbac03$XXXX@XXXXX.COM... QuoteThe message you posted is not an InterBase message (IB would never say |
Mikael
Delphi Developer |
2006-01-16 11:09:25 PM
Re:SQL Server Error: cannot update erased record
If it is not from interbase it must come from Delphi. You can see I just
display e.message. How do I create a call stack i in Delphi 7? Is this q better handled in DBExpress group? "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43cbb422$XXXX@XXXXX.COM... QuoteMikael writes: |
Mikael
Delphi Developer |
2006-01-17 02:13:12 AM
Re:SQL Server Error: cannot update erased record
The value I assignd to TransactionID, did match the identifier of an other
active transaction. I used a constant, but now changed to thread ID. I hope this was the problem. Mikael "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43cbbb7e$XXXX@XXXXX.COM... QuoteMikael writes: |
Mikael
Delphi Developer |
2006-01-18 03:50:28 PM
Re:SQL Server Error: cannot update erased record
Sorry to say. it did not work.
Isn't DBExpres thread safe? /M "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43cbbb7e$XXXX@XXXXX.COM... QuoteMikael writes: |
Mikael
Delphi Developer |
2006-01-20 04:36:05 PM
Re:SQL Server Error: cannot update erased record
Well I understand that se might have missed something or I can have done
a por application. The application stores data from xmlfiles into a database. Since this could be very havy traffic and I have a dual cpu machine I designed a threaded application (TService). The main thread starts, that many secondory threads, as said in the inifile. Every secondory thread creates it own datamodule. (and all work(coding) is done in the datamodule) I am pretty sure that this error occurs when two threads is working with the same data. That is possible since I only have to store the last copy of the data. ex supplier A sends an "Trade Item Declaration" to both buyer B and C. This will cause thread 1 working with file1 and thread 2 working with file 2. Both this files has the same data. And by the way I am never doing an update (se error message). I do delete and then insert. /Mikael "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43ce3a7c$XXXX@XXXXX.COM... QuoteMikael writes: |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-20 08:21:16 PM
Re:SQL Server Error: cannot update erased record
Mikael writes:
QuoteThe main thread starts, that many secondory threads, as said in the leaving transactions open after they affect a row. Practically speaking, you're *going* to get deadlocks doing what you're doing, and you must be prepared to handle them. Imagine this: 1) Thread 1 updates row 1 2) Thread 2 starts a transaction 3) Thread 2 updates row 1 (deadlock) 4) Thread 1 commits In a heavily multi-threaded app you can not avoid this, so you must handle it. -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz Want to help make Delphi and InterBase better? Use QC! qc.borland.com -- Vote for important issues |
Craig Stuntz [TeamB]
Delphi Developer |
2006-01-20 08:22:24 PM
Re:SQL Server Error: cannot update erased record
Mikael writes:
QuoteAnd by the way I am never doing an update (se error message). I do -- Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt your DBs! Open Edition users, get 6.0.1.6 from mers.com |
Mikael
Delphi Developer |
2006-01-23 04:52:04 PM
Re:SQL Server Error: cannot update erased record
Each thread creates it own datamodule. So I expect thats no sharing is done
here. And if deadlock was the problem I expect a "deadlock error message" not "cannot update erased record"!!!! Mikael "Craig Stuntz [TeamB]" <XXXX@XXXXX.COM [a.k.a. acm.org]>skrev i meddelandet news:43d0e3cc$XXXX@XXXXX.COM... QuoteMikael writes: |