If I do a "create table", it will succeed. It seems that I'm having problems only seeing the data returned…
It should be noted, if I use tsql, I can do this select.
Any help is much appreciated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-12-03
Works for me…
<pre>
www4:~$ python
Python 2.5 (r25:51908, Mar 16 2007, 19:36:04)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
>>> cn = pymssql.connect(host='x.x.x.x:1433', user='user', password='password')
>>> c = cn.cursor()
>>> c.execute('select 1')
>>> c.fetchall()
>>> c.execute('select 1')
>>> c.description
>>> c.fetchall()
>>> c.execute('select 1;')
>>> c.description
>>> c.fetchall()
>>>
</pre>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
I'm using pymssql-1.0.2-py2.5.egg-info on linux, but I can't do a basic select…
for example:
import pymssql
con = pymssql.connect(host=r'10.195.20.43:1433', user='xxx', password='pw', database='xxx')
cur = con.cursor()
cur.execute('select 1;')
print cur.description, " <- description"
print cur.fetchall()
returns:
$ python2.5 test4.py
(('', 3, None, None, None, None, None),) <- description
the freetds log is available at http://files.me.com/adamsummers1/c4ku09
If I do a "create table", it will succeed. It seems that I'm having problems only seeing the data returned…
It should be noted, if I use tsql, I can do this select.
Any help is much appreciated
Works for me…
<pre>
www4:~$ python
Python 2.5 (r25:51908, Mar 16 2007, 19:36:04)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymssql
>>> cn = pymssql.connect(host='x.x.x.x:1433', user='user', password='password')
>>> c = cn.cursor()
>>> c.execute('select 1')
>>> c.fetchall()
>>> c.execute('select 1')
>>> c.description
>>> c.fetchall()
>>> c.execute('select 1;')
>>> c.description
>>> c.fetchall()
>>>
</pre>
Hi,
Thanks for the confirmation. I now have it working, I probably made two mistakes:
1) I was using the dev version of freetds, not the current stable version (0.82).
2) My python was configured with -prefix=/home/adam/vlh ; but I didn't have /home/adam/vlh/lib in my LD_LIBRARY_PATH
Regards,
Adam