Re: [Firebird-devel] Statement type for INSERT ... RETURNING
> See discussions: > - subject "isc_info_sql_stmt_type/isc_info_sql_stmt_flags" on the 19th > and 20th of August 2021 > - subject "Firebird 5 and Update...Returning" on the 26th of November 2021 Thanks. I actually have a simple real world case. To comply with ADO.NET, insert/update/delete statements should return number of rows affected. Other statements should return -1. But it's difficult to detect the "insert" with "insert ... returning". -- Mgr. Jiří Činčura https://www.tabsoverspaces.com/ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Statement type for INSERT ... RETURNING
On 11-02-2022 17:46, Mark Rotteveel wrote: On 2022-02-11 12:54, Jiří Činčura wrote: Is there a way to get as a response to isc_info_sql_stmt_type for "INSERT ... RETURNING" isc_info_sql_stmt_insert instead of isc_info_sql_stmt_exec_procedure? Or something similar that would specify it's an "insert"? No. In fact, with Firebird 5, statements with RETURNING can even identify as isc_info_sql_stmt_select. The statement types are more about how you should handle statement execution than anything else. When it was discussed last time, I believe the idea was raised to add a new info type to get this information, but that it would first need a real use case to do so. I'll see if I can find that discussion. See discussions: - subject "isc_info_sql_stmt_type/isc_info_sql_stmt_flags" on the 19th and 20th of August 2021 - subject "Firebird 5 and Update...Returning" on the 26th of November 2021 Mark -- Mark Rotteveel Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Statement type for INSERT ... RETURNING
On 2022-02-11 12:54, Jiří Činčura wrote: Is there a way to get as a response to isc_info_sql_stmt_type for "INSERT ... RETURNING" isc_info_sql_stmt_insert instead of isc_info_sql_stmt_exec_procedure? Or something similar that would specify it's an "insert"? No. In fact, with Firebird 5, statements with RETURNING can even identify as isc_info_sql_stmt_select. The statement types are more about how you should handle statement execution than anything else. When it was discussed last time, I believe the idea was raised to add a new info type to get this information, but that it would first need a real use case to do so. I'll see if I can find that discussion. Mark Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel