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

cannot get returning data from insert statement when in ODBC version3 mode #171

Open
freakout42 opened this issue Jul 16, 2024 · 4 comments

Comments

@freakout42
Copy link
Contributor

cannot get returning data from insert statement when in ODBC version3 mode:

$ /opt/odbc/bin/isql Formax
SQL> insert into emp (ename) values ('g') returning id,ename,job,mgr,hiredate,sal,comm,dept_id;
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| id        | ename     | job       | mgr       | hiredate  | sal       | comm      | dept_id   |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
| 7945      | g         |           |           |           |           |           |           |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
SQLRowCount returns 1
1 rows fetched

$ /opt/odbc/bin/isql -3 Formax
SQL> insert into emp (ename) values ('f') returning id,ename,job,mgr,hiredate,sal,comm,dept_id;
[ISQL]INFO: SQLExecute returned SQL_NO_DATA
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
|           |           |           |           |           |           |           |           |
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
SQLRowCount returns 1

i want to use ODBC version3 but i also need the "INSERT ... RETURNING ..." functionalty.
what setting / procedure must i use to get the data in ODBC version3?

@lurcher
Copy link
Owner

lurcher commented Jul 16, 2024 via email

@freakout42
Copy link
Contributor Author

here the two logs.
v2.log
v3.log

@freakout42
Copy link
Contributor Author

the new record is inserted in both cases!

@lurcher
Copy link
Owner

lurcher commented Jul 16, 2024 via email

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