Skip to content
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

Add support for returning values... #74

Open
adrianlmm opened this issue May 10, 2020 · 3 comments
Open

Add support for returning values... #74

adrianlmm opened this issue May 10, 2020 · 3 comments

Comments

@adrianlmm
Copy link

Greetings, is not possible to retrieve values in statements with the RETURNING clause, example:

INSERT INTO EMPLOYEES (NAME) VALUES('PETER') RETURNING ID

After the execution this stament returns the autogenerated ID but is not possible to retrieve it in the current version of fb.

@jwood381
Copy link

The "returning" clause actual is supported, but sometimes doesn't work due to configuration error. I think the issue has to with copying libraries to proper folder but I have been unable to reliable recreate the problem. Sorry, I can't be more helpful :)

@adrianlmm
Copy link
Author

Returnig values stopped working in the recent versions of Firebird, the developers changed the behavior and now is not working.

@adrianlmm
Copy link
Author

I believe the issue is in the line 2065 of fb.c

isc_dsql_execute2(fb_connection->isc_status, &fb_connection->transact, &fb_cursor->stmt, SQLDA_VERSION1, NULL, NULL);

The last parameter should be a pointer to an out buffer when the statement type is "isc_info_sql_stmt_exec_procedure", that's the statement type when the query contains the RETURNING keyword.

Can anyone check it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants