Zeos 6.6.xx (alpha) MySql 4.0 and Lazarus 0.9.22 Beta

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
viemme
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 09.07.2007, 14:47

Zeos 6.6.xx (alpha) MySql 4.0 and Lazarus 0.9.22 Beta

Post by viemme »

Hy...
I tried to create a simple query runtime
Here the code

QueryRecuperaBottoni:=TZReadOnlyQuery.Create(Self);
QueryRecuperaBottoni.Connection:= ZconnectionCassa;
QueryRecuperaBottoni.SQL.Clear;
QueryRecuperaBottoni.SQL.Add('Select Description from buttonssettings');
QueryRecuperaBottoni.Open;
QueryRecuperaBottoni.First;
RecordIndex:=1;
while QueryRecuperaBottoni.EOF = false do
begin
bottoni[recordIndex] := TButton.Create(Self);
ButtonText:= QueryRecuperaBottoni.FieldByName('Description').AsString;
with Bottoni[recordIndex] do
begin
Parent := PanelButtons;
Caption := ButtonText ;
Top := RecordIndex * Height;
Tag := recordIndex;
end;
recordIndex:= recordIndex+1;
QueryRecuperaBottoni.Next;
end;

QueryRecuperaBottoni.Close;
QueryRecuperaBottoni.Free; [/font]

this simple query must retrieve a label to write on buttons (crated runtime)
I have the zconnection set to True,the compiler run but when i arrive to tis line:
ButtonText:= QueryRecuperaBottoni.FieldByName('CodiceCassa').AsString;
the runtime fail (External: SIGSEGV)
If i don't load the button text the procedure create the buttons (open query and create the right number of buttons)

What is the problem?

Thanks
Davide
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Can you attach a sample program and the database creation script? It may be easier to find the bug that way...
viemme
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 09.07.2007, 14:47

Post by viemme »

There is the small project,and the query to create the buttonssetting table of my database...

I create the zconnection, set the database, and connected...
I have also problem when i create at design time a TZQuery and TDataSource with a TDBGrid, in this case lazarus fail and close itself.

Thanks a Lot for your interesting...

PS: I work with
-Windows XP SP2
-MySQL 4.0.20a
-lazarus 0.9.22-Beta
You do not have the required permissions to view the files attached to this post.
viemme
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 09.07.2007, 14:47

Problem old version of mySQL client???

Post by viemme »

Hi, I tried with the component TMysql40Connection to connect my Database and i found an error...

The TMySql40Connection can not work with the installed MySQL client Version (3.23.30-Gamma)

Is possible that problem is the problem with the ZEOS component?

I try to chage the client...If possible...I don't now how to change it, but I try..

Thanks a Lot,
if You have a response how to change the installed mySQL client...
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

OH... that's the problem... 2 solutions
- just select the 3.23 protocol (you must enable it in zeos.inc because it's deprecated now)
- copy the 4.0 dll from the zeoslib distribution or mysql distribution next to your executable (same dir) if you still want to keep the 3.23 dll on your system path.
viemme
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 09.07.2007, 14:47

Ok Work...Post Closed

Post by viemme »

Thanks...

Now Work, I had some problem with this Old Database version 4.0, and I tried to install a new One Version of MySQL (5) and with the new clientLibrary (libMySQL50.dll) work very Fine...

I decide to upgrade the MySQL because I want this project running also on Linux, there is some porblems if I use this versions of ZEOS and Lazarus?
I think to use only the standard components...

Thanks

Davide
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Normally this should work fine... Certainly with newer versions of zeos and lazarus/fpc.
Post Reply