I write little bit complex scripts that uses attribute query, but this attribute no longer exist. Is here any way how to make scripts like thisl like bellow make work again without rewriting it? Now i get this error:
Traceback (most recent call last):
File "./intranet_sql.py", line 7, in <module>
if mssql.query(query):
AttributeError: '_mssql.MssqlConnection' object has no attribute 'query'
query="select * from zam;"
if mssql.query(query):
rows=mssql.fetch_array()
numrow = rows[0][1]
for row in rows:
for i in range(numrow):
file = row[2][i][0]
print file
else:
print mssql.errmsg()
print mssql.stdmsg()
mssql.close();
-------end----------
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I clearly stated that 1.0.0 is API breaking version. Only DB-API level is backwards compatible. If you REALLY must, just stick to pre-1.0.0. Althought this single change should be pretty easy to automatically replace using small perl/python script.
Sorry for the inconvenience, new features are worth this small pain ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for responding so quickly. I will switch to pre-1.0.0. for this case, because of time shortage, but next time I will use new API&features ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I write little bit complex scripts that uses attribute query, but this attribute no longer exist. Is here any way how to make scripts like thisl like bellow make work again without rewriting it? Now i get this error:
Traceback (most recent call last):
File "./intranet_sql.py", line 7, in <module>
if mssql.query(query):
AttributeError: '_mssql.MssqlConnection' object has no attribute 'query'
Thank you in advance.
-------example code--------------
#!/usr/bin/python
import _mssql
mssql=_mssql.connect('10.59.99.15','sa','');
mssql.select_db('intranet')
query="select * from zam;"
if mssql.query(query):
rows=mssql.fetch_array()
numrow = rows[0][1]
for row in rows:
for i in range(numrow):
file = row[2][i][0]
print file
else:
print mssql.errmsg()
print mssql.stdmsg()
mssql.close();
-------end----------
Sorry, I clearly stated that 1.0.0 is API breaking version. Only DB-API level is backwards compatible. If you REALLY must, just stick to pre-1.0.0. Althought this single change should be pretty easy to automatically replace using small perl/python script.
Sorry for the inconvenience, new features are worth this small pain ;-)
Thank you for responding so quickly. I will switch to pre-1.0.0. for this case, because of time shortage, but next time I will use new API&features ;-)