Page 1 of 1

[solved] Where is mistake?

Posted: 21.08.2012, 14:36
by merovingio
Hi! i have execute query

AnsiString qry = "insert into cases (id_user,rts,id_host,id_manager) ";
qry+= "values (:idu,:rts,:idh,:idm)";

datam->zQuery->Active = false;
datam->zQuery->SQL->Text = qry;
datam->zQuery->Prepare();
datam->zQuery->ParamByName("idu")->AsInteger = 10;
datam->zQuery->ParamByName("rts")->AsString = "0517";
datam->zQuery->ParamByName("idh")->AsString = "PSR999";
datam->zQuery->ParamByName("idm")->AsInteger = 2;
datam->zQuery->ExecSQL();

But not append anything!
Where is mistake?

Posted: 21.08.2012, 15:14
by merovingio
Usign zTable result non change.


datam->ZTable1->Active = true;
datam->ZTable1->Append();
datam->ZTable1->FieldByName("id_user")->AsInteger = 10;
datam->ZTable1->FieldByName("rts")->AsString = "0517";
datam->ZTable1->FieldByName("id_host")->AsString = "PSR999";
datam->ZTable1->FieldByName("id_manager")->AsInteger = 10;
datam->ZTable1->Post();
datam->ZTable1->ApplyUpdates();

and not error returned.

Solution found.

Posted: 21.08.2012, 17:27
by merovingio
I've solved the problem.
It is because mysql server delay tables updates.
Returning home I found update tables with right values...
after several minutes from append queries.

Posted: 21.08.2012, 19:26
by EgonHugeist
merovingio,

wow what the hell are you doing that it could take minutes to see the results??

However, thank you for the reply that everything is ok.

The probles is in table format.

Posted: 22.08.2012, 10:01
by merovingio
Thanks for your help.

Today, changed type from InnoDB to MyIsam.
Using same application the update table is in realtime!!!
Strange!

Posted: 22.08.2012, 11:26
by EgonHugeist
merovingio,

Oh that is strange but could be true. I must admit my apps o work with InnoDB to and i've recognized strange speed differences between firebird and MySQL. Some operations on Firebird are 3x faster than on MySQL. So thank you for that hint. If i've the time to test the MyIsam engine i'll do it!

Posted: 22.08.2012, 14:03
by ism
MyIsam not support transactions
May be in this case?

Posted: 22.08.2012, 20:07
by EgonHugeist
ism,

that could be the reason but firebird does support transactions and is still extreamly fast. I've only recognized it in one of my apps i made for my own company. Damn firebird is really lightning fast but has issues if you want to change the client characterset after create the db. But ism that can be the reason for such speed differences on MySQL.

view your zeos application

Posted: 25.08.2012, 14:12
by merovingio
Hi! EgonHugeist... have you on youtube your zeos application?