New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with INSERT (...) RETURNING (...) and using dbExpress with Delphi [CORE5592] #5858
Comments
Commented by: Sean Leyne (seanleyne) Luiz Fernando, Where is no error message. |
Commented by: Luiz Fernando Trevisan (luizztrevisan) this is source code In Firebird 2.5.7 the code works perfectly I am doing tests for migration to Firebird 3.0, and this command is no longer working |
Modified by: Luiz Fernando Trevisan (luizztrevisan)Attachment: Insert_Returning.zip [ 13171 ] |
Commented by: @ibaseru this is dbExpress problem, not Firebird. |
Commented by: Luiz Fernando Trevisan (luizztrevisan) ok, I got it Some time ago, in Firebird 2.5, there was a same request for this "problem" where it was solved in build 2.5.1 Follow the link: |
Modified by: Sean Leyne (seanleyne)status: Open [ 1 ] => Resolved [ 5 ] resolution: Won't Fix [ 2 ] |
Commented by: @asfernandes It's looking like a regression, no? Why won't fix? |
Commented by: Sean Leyne (seanleyne) I was acting based on @kdv's comments. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @asfernandes Luiz Fernando, please check if the problems happens when using Firebird embedded. |
Commented by: Luiz Fernando Trevisan (luizztrevisan) Adriano dos Santos, com o Firebird embedded acontece a mesma coisa. entrei em contato com os desenvolvedores da DevExpress, eles sugeriram fazer a execução dos comandos com insert ... returning de uma outra forma. fiz a abertura do chamado pois, utilizando a fbclient 2.5 e o firebird 2.5, ao executar o comando ".Open" o resultado é retornado sem problemas, |
Commented by: Sean Leyne (seanleyne) Luiz Fernando, Please post comments in English. |
Commented by: Alison Dennis (alisondv) Hi, I'm using Firebird 3.0.4 with DBExpress and the same error occurs: "SQL Server Error: Cursor is not open." Insert Into TBCTENFELOG The Sql above works fine with FB 2.1. I'm working on the migration to Firebird 3.0.4 and I like to know if this "bug" will be fixed on a future version? |
The solution I found was to run the INSERT RETURNING inside an EXECUTE BLOCK. I'm using TSQLDataSet. Remembering that it is necessary to change the ParamCheck property to false, because the component understands the : of the return as a parameter. EXECUTE BLOCK SUSPEND; |
@Prodevy7 In Firebird 4 and earlier, a statement with |
Submitted by: Luiz Fernando Trevisan (luizztrevisan)
Attachments:
Insert_Returning.zip
using dbExpress components (TSQLConnection and TSQLDataSet)
running this command:
insert into CAD_CULTURAS (EMPRESA,
CODIGO,
NOME)
values (1,
null,
'soja')
returning CODIGO
The following error message is generated
Cursor is not open.
In Firebird 2.5.7 the code works perfectly
The text was updated successfully, but these errors were encountered: