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

Getting error on calling commit() method #70

Open
parthiv11 opened this issue Aug 16, 2022 · 8 comments
Open

Getting error on calling commit() method #70

parthiv11 opened this issue Aug 16, 2022 · 8 comments

Comments

@parthiv11
Copy link

>>> con.commit()
Exception: [OneDB][OneDB ODBC Driver]Driver not capable. SQLCODE=-11092

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
    return_value = IfxPy.commit(self.conn_handler)
SystemError: <built-in function commit> returned a result with an error set

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\UserName\AppData\Local\Programs\Python\Python37\lib\site-packages\IfxPyDbi.py", line 573, in commit
    raise _get_exception(inst)
IfxPyDbi.Error: IfxPyDbi::Error: SystemError('<built-in function commit> returned a result with an error set')

Help me please to solve this..

@parthiv11 parthiv11 changed the title Getting error on calling commit method Getting error on calling commit() method Aug 16, 2022
@jsagrera
Copy link
Collaborator

Did you create the database with logging (e.g., "create database test with log")?
Any transaction op (like commit) will fail if you are connected to a non-logged database

@parthiv11
Copy link
Author

@jsagrera can i found if current database is logged or not by using ifxpy

@jsagrera
Copy link
Collaborator

You can run the following SQL:

> select name,is_logging,is_buff_log from sysmaster:sysdatabases where name='stores7';



name         stores7
is_logging   1
is_buff_log  0

1 row(s) retrieved.

>

@parthiv11
Copy link
Author

parthiv11 commented Aug 16, 2022

is there any direct method/function in ifxpy

@jsagrera
Copy link
Collaborator

An Informix database needs to have logging to be able to support transactions. You can change the mode (logging) of the database with the ondblog command (but will require a backup). More info here: https://www.ibm.com/support/pages/how-change-database-logging-mode-using-ondblog-command

@parthiv11
Copy link
Author

Ok thank you so much sir @jsagrera

@parthiv11
Copy link
Author

parthiv11 commented Aug 17, 2022

@jsagrera why InformixAlchemy is not publish on Pypi ??

@jsagrera
Copy link
Collaborator

I guess because it is still on the "development" phase.

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