Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-06

Inserting first record

11 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

LacaK

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.

Reply by email

Unknown author
to LacaK
LacaK wrote
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.

Is the problem only with sqlite ?

Michael.

Reply by email

LacaK
to Unknown author
Show quoted text 6 lines
> 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. Is the problem only with sqlite ?

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
Michael. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

LacaK
to Unknown author: 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.

Reply by email

Unknown author
to LacaK: Here is attached debug output with {$DEFINE DSDebug}. It seems, that exception is related…
LacaK wrote
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

Well, probably because there is no 'previous' buffer if the dataset was empty prior to insert.

Michael.

Show quoted text 14 lines
... 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.

Reply by email

Unknown author
to LacaK

Hi,

I committed a possible fix in rev. 17704. Please test.

Michael.

LacaK wrote 17 lines
May be like this ? Thanks. Laco. > On Thu, 2011-06-09 at 11:49 +0200, LacaK wrote: > >> 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 >> > > Can't you just post the backtrace? > Joost. > >

Reply by email

LacaK
to Unknown author

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
Hi, I committed a possible fix in rev. 17704. Please test. Michael. On Thu, 9 Jun 2011, LacaK wrote: > May be like this ? > Thanks. > Laco. > >> On Thu, 2011-06-09 at 11:49 +0200, LacaK wrote: >> >>> 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 >>> >> >> Can't you just post the backtrace? Joost. >> >> > > _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Unknown author
to LacaK
LacaK wrote
Very 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.

Show quoted text 33 lines
> > Hi, > > I committed a possible fix in rev. 17704. Please test. > > Michael. > > On Thu, 9 Jun 2011, LacaK wrote: > >> May be like this ? >> Thanks. >> Laco. >> >>> On Thu, 2011-06-09 at 11:49 +0200, LacaK wrote: >>> >>>> 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 >>>> >>> >>> Can't you just post the backtrace? Joost. >>> >>> >> >> > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel >

Reply by email