You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hitting a problem when trying to truncate tables on an mssql server (2017 dev).
I use python3.6 up to date with 4 weeks old pypi's pypyodbc on centos7.4 using the distro's freetds and odbc packages:
File "./marshall_sql_logs.py", line 146, in <module>
cursor.execute("truncate table journaux.dbo.logs;")
File "/home/work/.virtualenvs/multex/lib/python3.6/site-packages/pypyodbc.py", line 1626, in execute
self.execdirect(query_string)
File "/home/work/.virtualenvs/multex/lib/python3.6/site-packages/pypyodbc.py", line 1653, in execdirect
self._NumOfRows()
File "/home/work/.virtualenvs/multex/lib/python3.6/site-packages/pypyodbc.py", line 1817, in _NumOfRows
check_success(self, ret)
File "/home/work/.virtualenvs/multex/lib/python3.6/site-packages/pypyodbc.py", line 1007, in check_success
ctrl_err(SQL_HANDLE_STMT, ODBC_obj.stmt_h, ret, ODBC_obj.ansi)
File "/home/work/.virtualenvs/multex/lib/python3.6/site-packages/pypyodbc.py", line 985, in ctrl_err
raise Error(state,err_text)
pypyodbc.Error: ('HY010', '[HY010] [unixODBC][Driver Manager]Function sequence error')
I've tried a few tricks, but to no avail. I'm at a loss as to what goes wrong here, I can run the same query in smss (the ms sql console "gui") and it works flawlessly...
On my centos client, from python, I can also dump the query in a text file and run it sucessfully via the tsql client using
os.system("tsql %logindetails% dumpedquery.txt")
but its a total kludge that I dont want to live with...
The text was updated successfully, but these errors were encountered:
Hi,
I'm hitting a problem when trying to truncate tables on an mssql server (2017 dev).
I use python3.6 up to date with 4 weeks old pypi's pypyodbc on centos7.4 using the distro's freetds and odbc packages:
Here is some quick and dirty code:
And here is the error stack:
I've tried a few tricks, but to no avail. I'm at a loss as to what goes wrong here, I can run the same query in smss (the ms sql console "gui") and it works flawlessly...
On my centos client, from python, I can also dump the query in a text file and run it sucessfully via the tsql client using
but its a total kludge that I dont want to live with...
The text was updated successfully, but these errors were encountered: