|
From: Michał S. <mi...@sa...> - 2011-01-25 21:43:43
|
Hi, I'm trying to get Python to work with a ASA 9.0.1 server and having
not much luck...
Just to confirm the server's working and such, the following in Perl
works fine:
DBI->connect('DBI:Sybase:server=asademo;database=asademo', 'DBA',
'SQL');
First I tried python-mssql as it's supposed to work with Sybase, too,
but I couldn't get connected to the database at all, getting "Could not
set connection properties" errors when I was able to connect at last.
I also tried tsql itself, which seemed to connect (I got a 1> prompt)
but regardless of what query I tried to execute, I got no response,
dropping me to another prompt (2>).
After some googling I found out that I should be using python-sybase. I
tried both 0.39 and 0.40pre1, yielding the same results:
> ctx.c:242: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘clientmsg_cb’
> ctx.c:287: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘servermsg_cb’
> ctx.c: In function ‘CS_CONTEXT_ct_callback’:
> ctx.c:364: error: ‘clientmsg_cb’ undeclared (first use in this
> function)
> ctx.c:364: error: (Each undeclared identifier is reported only
> once
> ctx.c:364: error: for each function it appears in.)
> ctx.c:370: error: ‘servermsg_cb’ undeclared (first use in this
> function)
> error: command 'gcc' failed with exit status 1
when built without -DHAVE_FREETDS. It built and installed fine with
either of -DHAVE_FREETDS and -DHAVE_FREETDS=82 (I've freetds 0.82 from
Debian lenny), but then trying to import the Sybase module results in:
> /usr/local/lib/python2.6/dist-packages/python_sybase-0.39-py2.6-linux-i686.egg/sybasect.so: undefined symbol: cs_config
And now I give up :/
Am I doing something wrong or do I simply have to drop that and go some
other route?
Best regards,
--
Michał Sawicz <mi...@sa...>
|