Sign in Join

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

Mailing lists / lazarus / 2015-03

TDBCalendar problems

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Donald Ziesig

Hi All!

I have been trying to get the TDBCalendar control to update my database with no success. If I manually update the date field in the table, the value is immediately reflected in the control - it changes to the correct date. On the other hand, if I put the dataset in Edit or Insert mode and change the control's date, nothing happens after posting the data. The field retains its original value (either blank or the date I manually entered).

While trying to debug this, I found a method
"TFieldDataLink.UpdateRecord" which is invoked by many of the included files (*.inc) from DBCtrls.pp, but I can't find anywhere in the source code where this method is declared. Since this is where I would expect the value to be written in the table, and debugger "step-into" doesn't, I am at a dead end in debugging.

Am I missing something simple in the use of TDBCalendar (likely) or am I doing something that no one has ever tested (unlikely)?

Thanks,

Don Ziesig

Reply by email

Joost van der Sluis
to Donald Ziesig
Donald Ziesig wrote 16 lines
Hi All! I have been trying to get the TDBCalendar control to update my database with no success. If I manually update the date field in the table, the value is immediately reflected in the control - it changes to the correct date. On the other hand, if I put the dataset in Edit or Insert mode and change the control's date, nothing happens after posting the data. The field retains its original value (either blank or the date I manually entered). While trying to debug this, I found a method "TFieldDataLink.UpdateRecord" which is invoked by many of the included files (*.inc) from DBCtrls.pp, but I can't find anywhere in the source code where this method is declared. Since this is where I would expect the value to be written in the table, and debugger "step-into" doesn't, I am at a dead end in debugging.

Search for the fpc/packages/fcl-db source-folder. Make this the default directory in a console and do "fppkg install -o -gl". Thereafter you can step-into the fcl-db code. Maybe that can help.

And to see if you have done something strange, a simple example application would be nice. Especially if it can use the test-database in packages/fcl-db/tests.

Joost.

Reply by email