unixODBC SQLSEVER OUPUT issue
akm <[email protected]>
| Newsgroups | gmane.comp.python.egenix.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
The query given below is supposed to return all columns from the table
'table_name' for the record with user '111'.
I am not getting any result from linux while excuting fetchone() , but
it works fine in windows.
Can anyone give me a pointer why this occurs ?
#test.py
query = """update table_name
set upd_dt = getdate(),
user =222,
OUPUT INSERTED.*
where user = 111,
"""
def connectToDataBase(connstr):
if sys.platform == 'win32':
from mx.ODBC import Windows
db = Windows.DriverConnect(connstr, clear_auto_commit = 1)
conn = db.cursor()
else:
from mx.ODBC import unixODBC
db = unixODBC.DriverConnect(connstr, clear_auto_commit = 1)
conn = db.cursor()
conn.execute(result)
print conn.fetchone()
if __name__ == '__main__':
print connectToDataBase('dsn=sb;uid=user;pwd=passwd')
Thanks,
Abdul Kader M
_______________________________________________________________________
eGenix.com User Mailing List http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users