execSQL with POSTGRESQL
Posted: 15.12.2009, 18:45
Hi all,
i have been using zeos version 6.1.5 for quite some time, i have been having trouble trying to migrate one of my old applications to use the new version of zeos 6.6.5.
One of the problems, is that i cant do a simple insert in the following way.
Iam using c++builder 6, with postgresql 8.2.13, zeos component 6.6.5, protocol "postgresql-8".
ZQuery1->SQL->Text = "INSERT INTO cars(model) VALUES('A3');";
ZQuery1->ExecSQL();
i get an memory access error.
I can execute the query in this way thow, but iam under the impression this is not correct way to execute i INSERT, UPDATE OR DELETE query.
ZQuery1->Close();
ZQuery1->SQL->Text = "INSERT INTO cars(model) VALUES('A3');";
ZQuery1->Open();
because this way the zquery remains Active, after executing the SQL code.
Hope someone can point me to the right direction.
Thanks in advanced
i have been using zeos version 6.1.5 for quite some time, i have been having trouble trying to migrate one of my old applications to use the new version of zeos 6.6.5.
One of the problems, is that i cant do a simple insert in the following way.
Iam using c++builder 6, with postgresql 8.2.13, zeos component 6.6.5, protocol "postgresql-8".
ZQuery1->SQL->Text = "INSERT INTO cars(model) VALUES('A3');";
ZQuery1->ExecSQL();
i get an memory access error.
I can execute the query in this way thow, but iam under the impression this is not correct way to execute i INSERT, UPDATE OR DELETE query.
ZQuery1->Close();
ZQuery1->SQL->Text = "INSERT INTO cars(model) VALUES('A3');";
ZQuery1->Open();
because this way the zquery remains Active, after executing the SQL code.
Hope someone can point me to the right direction.
Thanks in advanced