Forum > Packages and Libraries

Using TDBZVDateTimePicker

(1/2) > >>

shumphreys:
Hi,
I have a database-aware app I am building (using MySQL) and Lazarus (FPC 2.4.2).  When using the TDBZVDateTimePicker it connetcs to the DB and displays the right data but the calendar control does not pop up when the button to the right of the control is clicked.  The non-db aware version does have this behaviour.  Is there anything special that needs to be set up for the db-aware version?
Thanks

Zoran:

--- Quote from: shumphreys on November 20, 2011, 09:57:14 pm ---Hi,
I have a database-aware app I am building (using MySQL) and Lazarus (FPC 2.4.2).  When using the TDBZVDateTimePicker it connetcs to the DB and displays the right data but the calendar control does not pop up when the button to the right of the control is clicked.  The non-db aware version does have this behaviour.  Is there anything special that needs to be set up for the db-aware version?
Thanks

--- End quote ---

No, there is nothing special to be set in db-aware version.
I can't reproduce your problem.

Which Lazarus version are you using? Which OS? Which widgetset?
Could you please upload a simple example application which shows your problem? Use this simple database table:

--- Code: ---CREATE TABLE TABLE1
(
  ID integer NOT NULL,
  DAT date,
  PRIMARY KEY (ID)
)

--- End code ---

Insert a couple of records:

--- Code: ---INSERT INTO TABLE1 (ID, DAT) VALUES (1, '2000-01-01');
INSERT INTO TABLE1 (ID, DAT) VALUES (2, '2001-02-03');
INSERT INTO TABLE1 (ID, DAT) VALUES (3, '2003-12-23');
INSERT INTO TABLE1 (ID, DAT) VALUES (4, '2005-06-14');

--- End code ---

shumphreys:
Many thanks. 

I did as you suggested and (of course) it works fine in the sample application :)

Still not in my other one which means I have something wrong there .... It's a while since I did any Db Programming (with Delphi) and so am trying this out with Lazarus for fun.  I am falling over several fundamental errors (which is good as that's how you learn) but it would be useful if anyone can point to an idiot's guide of building a simple Db app (with 3-4 tables) with Lazarus.

Cheers

BigChimp:
Try searching the wiki, there's some good db tutorials there (I remember updating SQLdb Tutorial1, that seemed fairly clear). If they're not sufficient/unclear, post here and tell us what's wrong, maybe I or somebody else can fix the tutorial...

Thanks.

Zoran:

--- Quote from: shumphreys on November 22, 2011, 12:31:44 am ---Many thanks. 

I did as you suggested and (of course) it works fine in the sample application :)

Still not in my other one which means I have something wrong there .... It's a while since I did any Db Programming (with Delphi) and so am trying this out with Lazarus for fun.  I am falling over several fundamental errors (which is good as that's how you learn) but it would be useful if anyone can point to an idiot's guide of building a simple Db app (with 3-4 tables) with Lazarus.

Cheers

--- End quote ---

I found these SQLdb tutorials on wiki pages:

http://wiki.lazarus.freepascal.org/SQLdb_Package
http://wiki.lazarus.freepascal.org/Working_With_TSQLQuery
http://wiki.lazarus.freepascal.org/SQLdb_Tutorial1
http://wiki.lazarus.freepascal.org/SqlDBHowto
http://wiki.lazarus.freepascal.org/MySQLDatabases - this one works with MySQL, which you use.

However, if you have experience with BDE or ADO DB components in Delphi, you might find ZEOS components (http://zeos.firmos.at/) easier to start with than SQLdb.

Navigation

[0] Message Index

[#] Next page

Go to full version