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
Zeos 6.6.xx (alpha) MySql 4.0 and Lazarus 0.9.22 Beta
Moderators: gto, cipto_kh, EgonHugeist
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
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.
Problem old version of mySQL client???
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...
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...
Ok Work...Post Closed
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
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