I'm a newbie to ZeosLib so apologies if this is the wrong forum for this post.
I'm able to perform an "INSERT INTO table (...) VALUES (...) RETURNING oid" statement using a TZquery component, but is this possible using an IZStatement or IZPreparedStatement instead?
Perform INSERT ... RETURNING statement using IZStatement?
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Perform INSERT ... RETURNING statement using IZStatement?
Hello angusj,
TZQuery usually should already be doing this - if your Zeos already supports this with your database. In principle this should also be possible with an IZPrepared statement. But you will not have the simple data bindiung suport of TDataset then.
With best regards,
Jan
TZQuery usually should already be doing this - if your Zeos already supports this with your database. In principle this should also be possible with an IZPrepared statement. But you will not have the simple data bindiung suport of TDataset then.
With best regards,
Jan
Re: Perform INSERT ... RETURNING statement using IZStatement?
Hi Jan. Thanks for replying.
Yes, it is but I just need to know the OID that's returned by an INSERT statement (using a Postgresql database) but without the overhead of a TDataset component, and I can't find a way to do that.marsupilami wrote:TZQuery usually should already be doing this
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Perform INSERT ... RETURNING statement using IZStatement?
Hello angusj,
in that case you usually create an IZStatement or IZPreparedStatement, call ExecuteQuery or ExecuteQueryPrepared and see if you get an IZResultSet. Your best bet in that case is to check the JDBC specification for help then because the ZDBC layer still is a port of the JDBC API to Object Pascal. Also see this link: http://archive.li/KOWz5
It might be a good idea to resurrect that archived article and move it into the SourceForge Knowledge Base...
With best regards,
Jan
in that case you usually create an IZStatement or IZPreparedStatement, call ExecuteQuery or ExecuteQueryPrepared and see if you get an IZResultSet. Your best bet in that case is to check the JDBC specification for help then because the ZDBC layer still is a port of the JDBC API to Object Pascal. Also see this link: http://archive.li/KOWz5
It might be a good idea to resurrect that archived article and move it into the SourceForge Knowledge Base...
With best regards,
Jan
Re: Perform INSERT ... RETURNING statement using IZStatement?
OK, thanks again.