This is second email. Can somebody confirm, that there is Access Violation when we insert (or append) first row into empty dataset ? (or I missed something?)
You can use attached program.
TIA
L.
Mailing lists / fpc-devel / 2011-06
Inserting first record
11 messages · 4 people ·
- LLacaK 5
- UUnknown author 4
- JJoost van der Sluis 1
- LLadislav Karrach 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
LacaK wroteThis is second email. Can somebody confirm, that there is Access Violation when we insert (or append) first row into empty dataset ? (or I missed something?) You can use attached program.
Is the problem only with sqlite ?
Michael.
Show quoted text 6 lines
No, I can reproduce it also for example with MySQL. But exception is somehow connected with printing (accessing) OldValue ... when I ommit query to this property, then no exception occurs
So It seems, that there must be fill more conditions:
1. Empty dataset
2. accessing OldValue ...
If you can, try my test program with your database. TIA
-Laco.
Show quoted text 6 lines
Is the problem only with sqlite ? Michael.
Here is attached debug output with {$DEFINE DSDebug}. It seems, that exception is related to Append/Insert (it does not depend if dataset is empty before or not) followed by accesing OldValue
...
Setting current record to0
Post: Browse mode set
Active buffer requested. Returning:0
exception at 0045C732:
Access violation.
SetBufListSize: -1
Freeing buffers :11
SetBufListSize: Final FBufferCount=-1
L.
LacaK wroteHere is attached debug output with {$DEFINE DSDebug}. It seems, that exception is related to Append/Insert (it does not depend if dataset is empty before or not) followed by accesing OldValue
Can't you just post the backtrace?
Joost.
Here is attached debug output with {$DEFINE DSDebug}. It seems, that exception is related…
LacaK wroteHere is attached debug output with {$DEFINE DSDebug}. It seems, that exception is related to Append/Insert (it does not depend if dataset is empty before or not) followed by accesing OldValue
Well, probably because there is no 'previous' buffer if the dataset was empty prior to insert.
Michael.
Show quoted text 14 lines
Can't you just post the backtrace? Joost. My Lazarus blog:…
May be like this ?
Thanks.
Laco.
Show quoted text 12 lines
Hi,
I committed a possible fix in rev. 17704. Please test.
Michael.
LacaK wrote 17 lines
Very similar to my fix, which I did minute ago.
We can more cleanup code by removing unneeded parts. Please look at attached patch.
Thanks
L.
PS1: Yes it fixes AV
PS2: But still remains OldValue=null problem (see me 1st email)
Show quoted text 30 lines
LacaK wroteVery similar to my fix, which I did minute ago. We can more cleanup code by removing unneeded parts. Please look at attached patch.
Applied the patch.
Thanks L. PS1: Yes it fixes AV
Good :-)
PS2: But still remains OldValue=null problem (see me 1st email)
What email is that, I only find a message about AV ?
Michael.
