DB2 is supported at: https://groups.google.com/forum/#!forum/ibm_db
On Mon, Jul 2, 2018 at 7:21 AM, <siddhesh@erpdata.cloud> wrote: > I am using ibm_db_sa and as400 drivers to connect db2 for i. When I am going > to fetch data from the table which is not exists in db, then without giving > proper message application throws following error (Expected error is : Table > does not exists or something related to that) > Segmentation fault (core dumped) > > My code snippet is below: > > def connect_db2(): > try: > e = > create_engine("ibm_db_sa+pyodbc400://u000****:xxx...@172.29.xxx.xx/T10050sp", > pool_size=20, echo=False, > poolclass=QueuePool).connect() > except Exception as ex: > raise ex > return e > > def conn_test(): > try: > conn = connect_db2() > if conn: > data =conn.execute('select * from sourcedb.customers1') > for row in data: > print(row) > except Exception as ex: > print(ex.__str__()) > > > > -- > SQLAlchemy - > The Python SQL Toolkit and Object Relational Mapper > > http://www.sqlalchemy.org/ > > To post example code, please provide an MCVE: Minimal, Complete, and > Verifiable Example. See http://stackoverflow.com/help/mcve for a full > description. > --- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sqlalchemy+unsubscr...@googlegroups.com. > To post to this group, send email to sqlalchemy@googlegroups.com. > Visit this group at https://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.