Hi,
i use version 6.5.1 of zeos since five years now and had only little problems. Now i decided to upgrade to version 6.6 stable. I did it and now nothing works anymore
Until now is simply used the following in C++ to execute a statement:
TZQuery* pQuery = new TZQuery(Application);
pQuery->SQL->Add("UPDATE TABLE SET FIELD = 1 WHERE ID = 2");
pQuery->ExecSQL();
delete pQuery;
Simple and it works with 6.5.1 as expected. Now i get an access violation everytime ExecSQL is called.
Has anyone an idea why this happens?
Thanks and regards
Access violation with ExecSQL
Moderators: gto, EgonHugeist
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
Yes....
...you are right, of course. I set the connection in code but missed it here in the code fragment of my post . And the connection object ist valid and connected. I switched back to version 6.5.1 now and all works as expected, without changing any code.
The correct code is:
TZQuery* pQuery = new TZQuery(Application);
pQuery->Connection = pConnection;
pQuery->SQL->Add("UPDATE TABLE SET FIELD = 1 WHERE ID = 2");
pQuery->ExecSQL();
delete pQuery;
The correct code is:
TZQuery* pQuery = new TZQuery(Application);
pQuery->Connection = pConnection;
pQuery->SQL->Add("UPDATE TABLE SET FIELD = 1 WHERE ID = 2");
pQuery->ExecSQL();
delete pQuery;
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
Hello, belvasis,
as zeos does not support protocol to SQLServer you must be using ADO protocol. I have tested on ado protocol and PostgreSql server, and it seems to be ok. On the other hand I'm using Zeos 7 on Delphi. Maybe the error was fixed in v7?... Would you like to try Zeos 7 for your application? I know it is not stable, but we use it in our products with no problems.
Good luck!
as zeos does not support protocol to SQLServer you must be using ADO protocol. I have tested on ado protocol and PostgreSql server, and it seems to be ok. On the other hand I'm using Zeos 7 on Delphi. Maybe the error was fixed in v7?... Would you like to try Zeos 7 for your application? I know it is not stable, but we use it in our products with no problems.
Good luck!
Hm...that's something i don't understand. In Version 6.5.1 there was an protocol "mssql" and there is a driver MSSqlServer7 in the zeos source. Was this protcol removed? ADO is something i don't want to use. So i think i have to use the older version with c++. The funny thing is, that i upgraded my delphi client app also to version 6.6 and there it works without any problem.
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact: