You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
(3) |
Apr
(26) |
May
(7) |
Jun
|
Jul
(12) |
Aug
|
Sep
(13) |
Oct
(6) |
Nov
(14) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(31) |
Feb
(15) |
Mar
(6) |
Apr
(18) |
May
(11) |
Jun
(3) |
Jul
(7) |
Aug
(5) |
Sep
(6) |
Oct
(1) |
Nov
(2) |
Dec
(6) |
2004 |
Jan
(3) |
Feb
(3) |
Mar
(18) |
Apr
(4) |
May
(13) |
Jun
(32) |
Jul
(21) |
Aug
(22) |
Sep
(11) |
Oct
(2) |
Nov
(6) |
Dec
(5) |
2005 |
Jan
(4) |
Feb
(16) |
Mar
(21) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(15) |
Nov
(20) |
Dec
|
2006 |
Jan
(3) |
Feb
(1) |
Mar
(3) |
Apr
(5) |
May
(4) |
Jun
(6) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(8) |
Nov
|
Dec
(12) |
2007 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(9) |
Jun
(1) |
Jul
(6) |
Aug
(5) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
(6) |
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
(1) |
Dec
(4) |
2009 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(21) |
Sep
(11) |
Oct
(4) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2011 |
Jan
(9) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Dave C. <dj...@ob...> - 2003-01-24 04:47:20
|
>>>>> "Valerie" == Valerie R Coffman <vr...@co...> writes: Valerie> Hi, I've been trying to figure out this problem myself. I Valerie> don't think the error is in freetds, as far as I can tell. Valerie> Can someone just tell me how to turn on the debugging? (Yes, Valerie> I'm a newbie.) Debugging can be turned on by doing this: import Sybase Sybase._ctx.debug = 1 This should give enough clues to get to the bottom of the problem. I just realised that I have some minor unreleased changes which *may* have an impact on what you are seeing. I will see if I can get a new 0.36pre release out tonight. - Dave -- http://www.object-craft.com.au |
From: Dave C. <dj...@ob...> - 2003-01-24 04:40:02
|
> more information. I am using freetds v0.60 and python-sybase v0.35 > > [root@the-box db-stuff]# python > Python 2.2.1 (#1, Aug 30 2002, 12:15:30) > [GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import Sybase > >>> db = Sybase.connect('Server', 'user','passwd') > >>> c = db.cursor() > >>> c.execute("select * from docent.DRUser where userID = '50970'") > >>> c.fetchall() > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchall > row = self.fetchone() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 409, in fetchone > _array = _fetch_rows(self._cmd, self._bufs) > File "/usr/lib/python2.2/site-packages/Sybase.py", line 193, in _fetch_rows > elif status in (CS_ROW_FAIL, CS_FAIL, CS_CANCELED, > NameError: global name 'CS_PENDING' is not defined > >>> FreeTDS does not define the CS_PENDING and CS_BUSY values. The quick fix for this problem is to delete all references to CS_PENDING and CS_BUSY from Sybase.py. 0.36pre2 does not use CS_PENDING or CS_BUSY in Sybase.py - Dave -- http://www.object-craft.com.au |
From: Ashley G. <ash...@ho...> - 2003-01-23 18:36:56
|
more information. I am using freetds v0.60 and python-sybase v0.35 [root@the-box db-stuff]# python Python 2.2.1 (#1, Aug 30 2002, 12:15:30) [GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Sybase >>> db = Sybase.connect('Server', 'user','passwd') >>> c = db.cursor() >>> c.execute("select * from docent.DRUser where userID = '50970'") >>> c.fetchall() Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchall row = self.fetchone() File "/usr/lib/python2.2/site-packages/Sybase.py", line 409, in fetchone _array = _fetch_rows(self._cmd, self._bufs) File "/usr/lib/python2.2/site-packages/Sybase.py", line 193, in _fetch_rows elif status in (CS_ROW_FAIL, CS_FAIL, CS_CANCELED, NameError: global name 'CS_PENDING' is not defined >>> |
From: Ashley G. <ash...@ho...> - 2003-01-23 17:12:09
|
When I any application that includes calling fetchone() eg: i get the following error [root@the-box db-stuff]# python four.py Traceback (most recent call last): File "four.py", line 25, in ? print getDatabases() File "four.py", line 10, in getDatabases for row in c.fetchall(): File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchall row = self.fetchone() File "/usr/lib/python2.2/site-packages/Sybase.py", line 409, in fetchone _array = _fetch_rows(self._cmd, self._bufs) File "/usr/lib/python2.2/site-packages/Sybase.py", line 193, in _fetch_rows elif status in (CS_ROW_FAIL, CS_FAIL, CS_CANCELED, NameError: global name 'CS_PENDING' is not defined and the four.py programme i am running: #!/usr/bin/python import Sybase def getDatabases(): db=Sybase.connect('server','user','pwd') c=db.cursor() c.execute('select * from DRUser') varDatabases={} for row in c.fetchall(): varDatabases.setdefault(row[0],[]).append(row[1]) varDatabases.setdefault(row[0],[]).append(row[2]) c.close() db.close() outputHTML="Content-type: text/html\n\n" outputHTML+=""" <html> <body><center> <h5>test</h5> </center></body> </html>""" return outputHTML if __name__ == "__main__": print getDatabases() |
From: Valerie R. C. <vr...@co...> - 2003-01-22 12:38:14
|
Hi, I've been trying to figure out this problem myself. I don't think the error is in freetds, as far as I can tell. Can someone just tell me how to turn on the debugging? (Yes, I'm a newbie.) Thanks, Valerie |
From: Valerie R. C. <vr...@co...> - 2003-01-18 13:00:52
|
Hi, I'm getting Memory Errors with very simple queries using Python-Sybase 0.35 and the latest FreeTDS to connect to a MS SQL server. Is this a problem with FreeTDS? Will Kevin's patch (from an earlier thread) fix my problem? Or is there a problem with my code? Here is the code: import Sybase db = Sybase.connect(SERVER, USER, PASSWORD, DATABASE) db.execute("SELECT * FROM FEMMD_Parameters WHERE MDregionSize = 10") The table isn't that huge, maybe 100 rows or less. Anyway, I get the same error whether or not I include a condition that would select only a few lines. It might also help if I mention that I'm telling FreeTDS to use version 7.0 in the freetds.conf file. Here is the Traceback: Traceback (most recent call last): File "DBTest.py", line 10, in ? db.execute("SELECT * FROM FEMMD_Parameters WHERE MDregionSize = 10") File "/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py", line 727, in execute result_list = self._fetch_results() File "/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py", line 745, in _fetch_results bufs = _row_bind(cmd, self.arraysize) File "/afs/.msc.cornell.edu/i386_linux22/usr/local/pub/dm/lib/python2.1/site-packages/Sybase.py", line 159, in _row_bind status, buf = cmd.ct_bind(i + 1, fmt) MemoryError Thanks a lot, Valerie |
From: Laurent V. <va...@ti...> - 2003-01-15 10:03:02
|
Ok, it solved the problem. Thanks Laurent A 16:49 14/01/2003 +0200, vous avez =E9crit : >Hi, > >You need to close the cursor before you can commit your work: > >db.begin() >c=3Ddb.cursor() >c.callproc('sp_help') >c.close() >db.commit() > >works for me. > >Have fun, > Shai. > >-----Original Message----- >From: Laurent VASSEUR [mailto:va...@ti...] >Sent: Tuesday, January 14, 2003 10:44 >To: pyt...@ob... >Subject: [python-sybase] newbie problem > > >hi, > >I've just installed the Sybase module on solaris 2.7 / python 2.2. I tried >the following program to test it, but it fails... > >#!/bin/env python >import Sybase >Sybase._ctx.debug =3D 1 >import sys > >db=3DSybase.connect('DB','USR', 'PWD', database=3D'test') >c=3Ddb.cursor() > >db.begin() >c.callproc('sp_help') >db.commit() > >c.close () >db.close () >sys.exit() > >I get the following output : > >ct_con_alloc(ctx0, &conn) -> CS_SUCCEED, conn0 ct_con_props(conn0, CS_SET,= =20 >CS_USERNAME, "USR", CS_NULLTERM, NULL) -> >CS_SUCCEED >ct_con_props(conn0, CS_SET, CS_PASSWORD, "PWD", CS_NULLTERM, NULL) -> >CS_SUCCEED >servermsg_cb >ct_connect(conn0, "DB", CS_NULLTERM) -> CS_SUCCEED ct_options(conn0,=20 >CS_SET, CS_OPT_CHAINXACTS, 1, CS_UNUSED, NULL) -> CS_SUCCEED=20 >ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd0 ct_command(cmd0,=20 >CS_LANG_CMD, "use test", CS_NULLTERM, CS_UNUSED) -> CS_SUCCEED >ct_send(cmd0) -> CS_SUCCEED >servermsg_cb >ct_results(cmd0, &result) -> CS_SUCCEED, CS_CMD_SUCCEED ct_results(cmd0,=20 >&result) -> CS_SUCCEED, CS_CMD_DONE ct_results(cmd0, &result) ->=20 >CS_END_RESULTS, CS_FALSE >ct_cmd_drop(cmd0) -> CS_SUCCEED >ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd1 ct_cmd_alloc(conn0, &cmd) ->= =20 >CS_SUCCEED, cmd2 ct_command(cmd2, CS_LANG_CMD, "begin transaction",=20 >CS_NULLTERM, CS_UNUSED) >-> CS_SUCCEED >ct_send(cmd2) -> CS_SUCCEED >ct_results(cmd2, &result) -> CS_SUCCEED, CS_CMD_SUCCEED ct_results(cmd2,=20 >&result) -> CS_SUCCEED, CS_CMD_DONE ct_results(cmd2, &result) ->=20 >CS_END_RESULTS, CS_FALSE >ct_cmd_drop(cmd2) -> CS_SUCCEED >ct_command(cmd1, CS_RPC_CMD, "sp_help", CS_NULLTERM, CS_UNUSED) ->= CS_SUCCEED >ct_send(cmd1) -> CS_SUCCEED >ct_results(cmd1, &result) -> CS_SUCCEED, CS_ROW_RESULT ct_res_info(cmd1,=20 >CS_NUMDATA, &value, CS_UNUSED, NULL) -> CS_SUCCEED, 3 ct_describe(cmd1, 1,= =20 >&fmt) -> CS_SUCCEED, datafmt0=3D[name:"Name" >type:CS_CHAR_TYPE status:CS_UPDATABLE format:CS_FMT_UNUSED count:0 >maxlength:30] >ct_bind(cmd1, 1, &datafmt0->fmt=3D[name:"Name" type:CS_CHAR_TYPE >status:CS_UPDATABLE format:CS_FMT_UNUSED count:1 maxlength:30], >databuf0->buff, databuf0->copied, databuf0->indicator) -> CS_SUCCEED, >databuf0->databuf0 >ct_describe(cmd1, 2, &fmt) -> CS_SUCCEED, datafmt1=3D[name:"Owner" >type:CS_CHAR_TYPE status:48 format:CS_FMT_UNUSED count:0 maxlength:30]=20 >ct_bind(cmd1, 2, &datafmt1->fmt=3D[name:"Owner" type:CS_CHAR_TYPE status:48 >format:CS_FMT_UNUSED count:1 maxlength:30], databuf1->buff, >databuf1->copied, databuf1->indicator) -> CS_SUCCEED, databuf1 >ct_describe(cmd1, 3, &fmt) -> CS_SUCCEED, datafmt2=3D[name:"Object_type" >type:CS_CHAR_TYPE status:48 format:CS_FMT_UNUSED count:0 maxlength:22]=20 >ct_bind(cmd1, 3, &datafmt2->fmt=3D[name:"Object_type" type:CS_CHAR_TYPE >status:48 format:CS_FMT_UNUSED count:1 maxlength:22], databuf2->buff, >databuf2->copied, databuf2->indicator) -> CS_SUCCEED, databuf2 >ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd3 >ct_command(cmd3, CS_LANG_CMD, "commit transaction", CS_NULLTERM, CS_UNUSED) >-> CS_SUCCEED >clientmsg_cb >ct_send(cmd3) -> CS_FAIL >Traceback (most recent call last): > File "t.py", line 11, in ? > db.commit() > File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 696, in= =20 > commit > self.execute('commit transaction') > File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 724, in >execute > status =3D cmd.ct_send() > File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 141, in >_clientmsg_cb > raise DatabaseError(_fmt_client(msg)) >Sybase.DatabaseError: Layer: 1, Origin: 1 >ct_send(): couche api utilisateur: erreur externe: Impossible d'appeler >cette routine car une autre structure de commande est en attente de=20 >r=E9sultats. clientmsg_cb >ct_cmd_drop(cmd3) -> CS_FAIL >ct_cancel(conn0, NULL, CS_CANCEL_ALL) -> CS_SUCCEED >ct_cmd_drop(cmd1) -> CS_SUCCEED >ct_con_props(conn0, CS_GET, CS_CON_STATUS, &value, CS_UNUSED, NULL) -> >CS_SUCCEED, CS_CONSTAT_CONNECTED >ct_close(conn0, CS_FORCE_CLOSE) -> CS_SUCCEED >ct_con_drop(conn0) -> CS_SUCCEED > > >The error in english is : "user api layer: external error: This routine >cannot be called because another command structure has results pending." I= =20 >have the same pb if I perform an insert + select in the same transaction. >Any idea on what is going wrong ? > >Note: in order to compile the module, I had to add the library "itl" to >EXTRA_LIBS. My installation was done whith : >"python setup.py build_ext -U WANT_BULKCOPY" > > >Thanks, >Laurent > >_______________________________________________ >Python-sybase mailing list >Pyt...@ob...=20 >https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase Laurent VASSEUR Ing=E9nieur d=E9veloppement IGBMC va...@ig... |
From: <Sha...@in...> - 2003-01-15 09:49:13
|
Hi, You need to close the cursor before you can commit your work: db.begin() c=3Ddb.cursor() c.callproc('sp_help') c.close() db.commit() works for me. Have fun, Shai. -----Original Message----- From: Laurent VASSEUR [mailto:va...@ti...]=20 Sent: Tuesday, January 14, 2003 10:44 To: pyt...@ob... Subject: [python-sybase] newbie problem hi, I've just installed the Sybase module on solaris 2.7 / python 2.2. I = tried=20 the following program to test it, but it fails... #!/bin/env python import Sybase Sybase._ctx.debug =3D 1 import sys db=3DSybase.connect('DB','USR', 'PWD', database=3D'test') c=3Ddb.cursor() db.begin() c.callproc('sp_help') db.commit() c.close () db.close () sys.exit() I get the following output : ct_con_alloc(ctx0, &conn) -> CS_SUCCEED, conn0 ct_con_props(conn0, = CS_SET, CS_USERNAME, "USR", CS_NULLTERM, NULL) ->=20 CS_SUCCEED ct_con_props(conn0, CS_SET, CS_PASSWORD, "PWD", CS_NULLTERM, NULL) ->=20 CS_SUCCEED servermsg_cb ct_connect(conn0, "DB", CS_NULLTERM) -> CS_SUCCEED ct_options(conn0, = CS_SET, CS_OPT_CHAINXACTS, 1, CS_UNUSED, NULL) -> CS_SUCCEED = ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd0 ct_command(cmd0, = CS_LANG_CMD, "use test", CS_NULLTERM, CS_UNUSED) -> CS_SUCCEED ct_send(cmd0) -> CS_SUCCEED servermsg_cb ct_results(cmd0, &result) -> CS_SUCCEED, CS_CMD_SUCCEED ct_results(cmd0, = &result) -> CS_SUCCEED, CS_CMD_DONE ct_results(cmd0, &result) -> = CS_END_RESULTS, CS_FALSE ct_cmd_drop(cmd0) -> CS_SUCCEED ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd1 ct_cmd_alloc(conn0, &cmd) = -> CS_SUCCEED, cmd2 ct_command(cmd2, CS_LANG_CMD, "begin transaction", = CS_NULLTERM, CS_UNUSED)=20 -> CS_SUCCEED ct_send(cmd2) -> CS_SUCCEED ct_results(cmd2, &result) -> CS_SUCCEED, CS_CMD_SUCCEED ct_results(cmd2, = &result) -> CS_SUCCEED, CS_CMD_DONE ct_results(cmd2, &result) -> = CS_END_RESULTS, CS_FALSE ct_cmd_drop(cmd2) -> CS_SUCCEED ct_command(cmd1, CS_RPC_CMD, "sp_help", CS_NULLTERM, CS_UNUSED) -> = CS_SUCCEED ct_send(cmd1) -> CS_SUCCEED ct_results(cmd1, &result) -> CS_SUCCEED, CS_ROW_RESULT ct_res_info(cmd1, = CS_NUMDATA, &value, CS_UNUSED, NULL) -> CS_SUCCEED, 3 ct_describe(cmd1, = 1, &fmt) -> CS_SUCCEED, datafmt0=3D[name:"Name"=20 type:CS_CHAR_TYPE status:CS_UPDATABLE format:CS_FMT_UNUSED count:0=20 maxlength:30] ct_bind(cmd1, 1, &datafmt0->fmt=3D[name:"Name" type:CS_CHAR_TYPE=20 status:CS_UPDATABLE format:CS_FMT_UNUSED count:1 maxlength:30],=20 databuf0->buff, databuf0->copied, databuf0->indicator) -> CS_SUCCEED,=20 databuf0->databuf0 ct_describe(cmd1, 2, &fmt) -> CS_SUCCEED, datafmt1=3D[name:"Owner"=20 type:CS_CHAR_TYPE status:48 format:CS_FMT_UNUSED count:0 maxlength:30] = ct_bind(cmd1, 2, &datafmt1->fmt=3D[name:"Owner" type:CS_CHAR_TYPE = status:48=20 format:CS_FMT_UNUSED count:1 maxlength:30], databuf1->buff,=20 databuf1->copied, databuf1->indicator) -> CS_SUCCEED, databuf1 ct_describe(cmd1, 3, &fmt) -> CS_SUCCEED, datafmt2=3D[name:"Object_type" = type:CS_CHAR_TYPE status:48 format:CS_FMT_UNUSED count:0 maxlength:22] = ct_bind(cmd1, 3, &datafmt2->fmt=3D[name:"Object_type" type:CS_CHAR_TYPE=20 status:48 format:CS_FMT_UNUSED count:1 maxlength:22], databuf2->buff,=20 databuf2->copied, databuf2->indicator) -> CS_SUCCEED, databuf2 ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd3 ct_command(cmd3, CS_LANG_CMD, "commit transaction", CS_NULLTERM, = CS_UNUSED)=20 -> CS_SUCCEED clientmsg_cb ct_send(cmd3) -> CS_FAIL Traceback (most recent call last): File "t.py", line 11, in ? db.commit() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 696, in = commit self.execute('commit transaction') File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 724, in = execute status =3D cmd.ct_send() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 141, in = _clientmsg_cb raise DatabaseError(_fmt_client(msg)) Sybase.DatabaseError: Layer: 1, Origin: 1 ct_send(): couche api utilisateur: erreur externe: Impossible d'appeler=20 cette routine car une autre structure de commande est en attente de = r=E9sultats. clientmsg_cb ct_cmd_drop(cmd3) -> CS_FAIL ct_cancel(conn0, NULL, CS_CANCEL_ALL) -> CS_SUCCEED ct_cmd_drop(cmd1) -> CS_SUCCEED ct_con_props(conn0, CS_GET, CS_CON_STATUS, &value, CS_UNUSED, NULL) ->=20 CS_SUCCEED, CS_CONSTAT_CONNECTED ct_close(conn0, CS_FORCE_CLOSE) -> CS_SUCCEED ct_con_drop(conn0) -> CS_SUCCEED The error in english is : "user api layer: external error: This routine=20 cannot be called because another command structure has results pending." = I have the same pb if I perform an insert + select in the same = transaction.=20 Any idea on what is going wrong ? Note: in order to compile the module, I had to add the library "itl" to=20 EXTRA_LIBS. My installation was done whith : "python setup.py build_ext -U WANT_BULKCOPY" Thanks, Laurent _______________________________________________ Python-sybase mailing list Pyt...@ob... = https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Laurent V. <va...@ti...> - 2003-01-15 09:48:04
|
I have the same problem with a simple select statement. I'm using the=20 sybase libraries. Laurent A 15:37 14/01/2003 +0100, vous avez =E9crit : On Tue, 14 Jan 2003 09:43:50 +0100 Laurent VASSEUR <va...@ti...> wrote: > hi, > > I've just installed the Sybase module on solaris 2.7 / > python 2.2. I tried the following program to test it, but > it fails... > > #!/bin/env python > import Sybase > Sybase._ctx.debug =3D 1 > import sys > > db=3DSybase.connect('DB','USR', 'PWD', database=3D'test') > c=3Ddb.cursor() > > db.begin() > c.callproc('sp_help') > db.commit() > > c.close () > db.close () > sys.exit() > (...) Does it work with a simple SELECT statement? Or do you have the problem only when calling callproc()? Are you using the sybase libraries or freetds? Peter |
From: hopfgartner <hop...@ro...> - 2003-01-15 09:37:44
|
On Tue, 14 Jan 2003 09:43:50 +0100 Laurent VASSEUR <va...@ti...> wrote: > hi, > > I've just installed the Sybase module on solaris 2.7 / > python 2.2. I tried the following program to test it, but > it fails... > > #!/bin/env python > import Sybase > Sybase._ctx.debug = 1 > import sys > > db=Sybase.connect('DB','USR', 'PWD', database='test') > c=db.cursor() > > db.begin() > c.callproc('sp_help') > db.commit() > > c.close () > db.close () > sys.exit() > (...) Does it work with a simple SELECT statement? Or do you have the problem only when calling callproc()? Are you using the sybase libraries or freetds? Peter |
From: Laurent V. <va...@ti...> - 2003-01-15 03:41:47
|
hi, I've just installed the Sybase module on solaris 2.7 / python 2.2. I tried= =20 the following program to test it, but it fails... #!/bin/env python import Sybase Sybase._ctx.debug =3D 1 import sys db=3DSybase.connect('DB','USR', 'PWD', database=3D'test') c=3Ddb.cursor() db.begin() c.callproc('sp_help') db.commit() c.close () db.close () sys.exit() I get the following output : ct_con_alloc(ctx0, &conn) -> CS_SUCCEED, conn0 ct_con_props(conn0, CS_SET, CS_USERNAME, "USR", CS_NULLTERM, NULL) ->=20 CS_SUCCEED ct_con_props(conn0, CS_SET, CS_PASSWORD, "PWD", CS_NULLTERM, NULL) ->=20 CS_SUCCEED servermsg_cb ct_connect(conn0, "DB", CS_NULLTERM) -> CS_SUCCEED ct_options(conn0, CS_SET, CS_OPT_CHAINXACTS, 1, CS_UNUSED, NULL) ->= CS_SUCCEED ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd0 ct_command(cmd0, CS_LANG_CMD, "use test", CS_NULLTERM, CS_UNUSED) ->= CS_SUCCEED ct_send(cmd0) -> CS_SUCCEED servermsg_cb ct_results(cmd0, &result) -> CS_SUCCEED, CS_CMD_SUCCEED ct_results(cmd0, &result) -> CS_SUCCEED, CS_CMD_DONE ct_results(cmd0, &result) -> CS_END_RESULTS, CS_FALSE ct_cmd_drop(cmd0) -> CS_SUCCEED ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd1 ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd2 ct_command(cmd2, CS_LANG_CMD, "begin transaction", CS_NULLTERM, CS_UNUSED)= =20 -> CS_SUCCEED ct_send(cmd2) -> CS_SUCCEED ct_results(cmd2, &result) -> CS_SUCCEED, CS_CMD_SUCCEED ct_results(cmd2, &result) -> CS_SUCCEED, CS_CMD_DONE ct_results(cmd2, &result) -> CS_END_RESULTS, CS_FALSE ct_cmd_drop(cmd2) -> CS_SUCCEED ct_command(cmd1, CS_RPC_CMD, "sp_help", CS_NULLTERM, CS_UNUSED) ->= CS_SUCCEED ct_send(cmd1) -> CS_SUCCEED ct_results(cmd1, &result) -> CS_SUCCEED, CS_ROW_RESULT ct_res_info(cmd1, CS_NUMDATA, &value, CS_UNUSED, NULL) -> CS_SUCCEED, 3 ct_describe(cmd1, 1, &fmt) -> CS_SUCCEED, datafmt0=3D[name:"Name"=20 type:CS_CHAR_TYPE status:CS_UPDATABLE format:CS_FMT_UNUSED count:0=20 maxlength:30] ct_bind(cmd1, 1, &datafmt0->fmt=3D[name:"Name" type:CS_CHAR_TYPE=20 status:CS_UPDATABLE format:CS_FMT_UNUSED count:1 maxlength:30],=20 databuf0->buff, databuf0->copied, databuf0->indicator) -> CS_SUCCEED,= databuf0 ct_describe(cmd1, 2, &fmt) -> CS_SUCCEED, datafmt1=3D[name:"Owner"=20 type:CS_CHAR_TYPE status:48 format:CS_FMT_UNUSED count:0 maxlength:30] ct_bind(cmd1, 2, &datafmt1->fmt=3D[name:"Owner" type:CS_CHAR_TYPE status:48= =20 format:CS_FMT_UNUSED count:1 maxlength:30], databuf1->buff,=20 databuf1->copied, databuf1->indicator) -> CS_SUCCEED, databuf1 ct_describe(cmd1, 3, &fmt) -> CS_SUCCEED, datafmt2=3D[name:"Object_type"=20 type:CS_CHAR_TYPE status:48 format:CS_FMT_UNUSED count:0 maxlength:22] ct_bind(cmd1, 3, &datafmt2->fmt=3D[name:"Object_type" type:CS_CHAR_TYPE=20 status:48 format:CS_FMT_UNUSED count:1 maxlength:22], databuf2->buff,=20 databuf2->copied, databuf2->indicator) -> CS_SUCCEED, databuf2 ct_cmd_alloc(conn0, &cmd) -> CS_SUCCEED, cmd3 ct_command(cmd3, CS_LANG_CMD, "commit transaction", CS_NULLTERM, CS_UNUSED)= =20 -> CS_SUCCEED clientmsg_cb ct_send(cmd3) -> CS_FAIL Traceback (most recent call last): File "t.py", line 11, in ? db.commit() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 696, in= commit self.execute('commit transaction') File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 724, in=20 execute status =3D cmd.ct_send() File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 141, in=20 _clientmsg_cb raise DatabaseError(_fmt_client(msg)) Sybase.DatabaseError: Layer: 1, Origin: 1 ct_send(): couche api utilisateur: erreur externe: Impossible d'appeler=20 cette routine car une autre structure de commande est en attente de= r=E9sultats. clientmsg_cb ct_cmd_drop(cmd3) -> CS_FAIL ct_cancel(conn0, NULL, CS_CANCEL_ALL) -> CS_SUCCEED ct_cmd_drop(cmd1) -> CS_SUCCEED ct_con_props(conn0, CS_GET, CS_CON_STATUS, &value, CS_UNUSED, NULL) ->=20 CS_SUCCEED, CS_CONSTAT_CONNECTED ct_close(conn0, CS_FORCE_CLOSE) -> CS_SUCCEED ct_con_drop(conn0) -> CS_SUCCEED The error in english is : "user api layer: external error: This routine=20 cannot be called because another command structure has results pending." I have the same pb if I perform an insert + select in the same transaction.= =20 Any idea on what is going wrong ? Note : in order to compile the module, I had to add the library "itl" to=20 EXTRA_LIBS. My installation was done whith : "python setup.py build_ext -U WANT_BULKCOPY" Thanks, Laurent |
From: Dave C. <dj...@ob...> - 2002-12-13 00:02:39
|
Hello all. The purpose of this message is to collect some testimonials from the users of our Open Source software. We have recently joined Open Source Victoria (http://www.osv.org.au), which has the stated objective of being: "a new advocacy group formed to educate Victoria's (Australian) business and government leaders about the benefits of using Open Source software for both server and desktop environments." Your stories will be used to help the advocacy efforts of Open Source Victoria and more importantly, raise the profile of Open Source in general. (Of course it also helps us and our software stand out in the local market). Open Source advocacy obviously lacks the benefit of an enormous marketing budget, and therefore requires efforts at a grass roots level. Business and Government are generally very conservative and need to see that other organisations have successfully deployed Open Source products. Our products are: Albatross - A Toolkit for Highly Stateful Web Applications http://www.object-craft.com.au/projects/albatross/ CSV - A high performance CSV parser for Python http://www.object-craft.com.au/projects/csv/ MSSQL - A MS SQL Server module for Python http://www.object-craft.com.au/projects/mssql/ Paint - A fast, simple Python wrapper of libart, freetype, and libpng. http://www.object-craft.com.au/projects/paint/ sdk32 - A partial Python Wrap of the Win32 Platform SDK http://www.object-craft.com.au/projects/sdk32/ Sybase - A Sybase module for Python http://www.object-craft.com.au/projects/sybase/ It may come as a surprise, but we really have very little idea of who is using our software and what they are using it for. We would love to hear from you. Any contribution will be greatly appreciated. Please send email to: Mark Matthews <me...@ob...> Object Craft Pty Ltd. -- http://www.object-craft.com.au |
From: Tony B. <anb...@ho...> - 2002-12-11 22:54:43
|
Question regarding error handling when using stored procedures. If I have a procedure usp_delete_database_data which takes 3 parameters @dbID int, @error_no int output and @error_desc varchar(255) output, and I call this procedure using something as follows: try: varTest = c.callproc('usp_delete_database_data',{'@dbID':varDBID,'@error_no':varErrorNo,'@error_desc':varErrorDesc}) except Sybase.DatabaseError: print "Unable to delete database data for database_id" else: print "Success" Is there any way to capture the error_no and error_desc return variables? If I simply call the procedure using c.callproc outside of a try block and an SQL error occurs within the procedure, Python raises the Sybase.DatabaseError and the script blows up. When inside the try block the varErrorNo and varErrorDesc are not populated. I'm assuming this is because the c.callproc() doesn't really run successfully because of the Sybase.DatabaseError that is occurring? The procedure error that I am testing is a simple 2601 duplicate key insert error. I need the c.callproc() to run successfully and then be able to capture the error_no and error_desc outputs. Perhaps I'm missing something? Thanks _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail |
From: Tony B. <anb...@ho...> - 2002-12-10 18:17:59
|
SYBASE environment variable is set in /etc/profile as /usr/local/sybase and LD_LIBRARY_PATH is also set as $SYBASE/lib in /etc/profile. The Apache webserver is running as user "nobody". This user should still include these 2 env variables when it runs, correct? _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail |
From: Daren W. <dar...@ho...> - 2002-12-10 09:03:43
|
I'm trying to upgrade from a really old version (0.7) to 2.35. Mostly it is good, but I can no longer connect to a replication server - this should look like a normal sybase server >>>import Sybase >>>conn=Sybase.connect("REPSERVER", "sa", "xxxx") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/pkgs/python-2.0/lib/python2.0/site-packages/Sybase.py", line 670, in connect strip, auto_commit, delay_connect) File "/usr/local/pkgs/python-2.0/lib/python2.0/site-packages/Sybase.py", line 520, in __init__ self.connect() File "/usr/local/pkgs/python-2.0/lib/python2.0/site-packages/Sybase.py", line 536, in connect self._raise_error(Error, 'ct_options') File "/usr/local/pkgs/python-2.0/lib/python2.0/site-packages/Sybase.py", line 525, in _raise_error raise exc(text) Sybase.Error: ct_options Msg 17001, Level 10, State 0: Line 0: No SRV_OPTION handler installed. Layer: 1, Origin: 1 ct_options(): user api layer: external error: An error was returned from the server while setting the options, check the server message for details. >>> If I comment out the line status = conn.ct_options(CS_SET, CS_OPT_CHAINXACTS, not self.auto_commit) in Sybase.py then it will work ok - but presumably this is doing something important. The repserver is version 11.5.1, and I'm using python 2.0 on solaris. Any help or advice is appreciated. Thanks, Daren. _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail |
From: Marcos P. <msa...@gr...> - 2002-12-10 06:20:18
|
Is the SYBASE env var set when run from CGI? El vie, 06-12-2002 a las 18:51, Tony Burger escribi=F3: > This is kinda wierd. This works just fine when run from the command line=20 > using "python script_name.py" but blows up when run in a CGI fashion. Any= =20 > ideas why it can't find "comn_free"? > ###################################################################### > #!/usr/bin/python >=20 > import Sybase >=20 > def getDatabases(): > db=3DSybase.connect('srv','sa','pwd',database=3D'db',auto_commit=3D1) > c=3Ddb.cursor() > c.execute('select * from corp_defects_td_databases order by=20 > database_report_name asc') > varDatabases=3D{} > for row in c.fetchall(): > varDatabases.setdefault(row[0],[]).append(row[1]) > varDatabases.setdefault(row[0],[]).append(row[2]) > c.close() > db.close() > outputHTML=3D"Content-type: text/html\n\n" > outputHTML+=3D""" > <html> > <body><center> > <h5>test</h5> > </center></body> > </html>""" > return outputHTML >=20 > if __name__ =3D=3D "__main__": > print getDatabases() > ###################################################################### > Error Log: >=20 > [error] Premature end of script headers: corp_defect_admin.py > [error] Traceback (most recent call last): > [error] File "/home/tonyb/html/cgi-bin/corp_defect_admin.py", line 3, in = ? > [error] import Sybase > [error] File=20 > "/usr/local/python-threads/lib/python2.2/site-packages/Sybase.py", line 2= 0,=20 > in ? > [error] from sybasect import * > [error] ImportError: /usr/local/sybase/lib/libcomn.so: undefined symbol:=20 > comn_free >=20 > Thanks. >=20 >=20 > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online=20 > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3D3963 >=20 > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase --=20 Marcos S=E1nchez Provencio <msa...@gr...> www.burke.es |
From: hopfgartner <hop...@ro...> - 2002-12-10 04:27:39
|
On Sun, 8 Dec 2002 00:42:56 -0800 (PST) ghostdog <s80...@ya...> wrote: > > hi > > how do i update a table using the execute() method? > > cheers > Should be simply: import Sybase sql_conn = Sybase.connect(dsn, user, password, database) sql_cursor = sql_conn.cursor() sql_cursor.execute('UPDATE my_table SET my_col = whatever WHERE where_condition') Peter |
From: Harri P. <har...@tr...> - 2002-12-10 03:05:18
|
On Friday 06 December 2002 18:51, Tony Burger wrote: > This is kinda wierd. This works just fine when run from the command lin= e > using "python script_name.py" but blows up when run in a CGI fashion. A= ny > ideas why it can't find "comn_free"? [SNIP| > [error] from sybasect import * > [error] ImportError: /usr/local/sybase/lib/libcomn.so: undefined symbol= : > comn_free LD_LIBRARY_PATH? Problem is most likely that it picks up /usr/lib/libintl.so (gettext=20 library), and not the sybase version (probably in your environment in=20 /usr/local/sybase/lib/libintl.so). -Harri |
From: ghostdog <s80...@ya...> - 2002-12-09 03:42:59
|
hi how do i update a table using the execute() method? cheers --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now |
From: Tony B. <anb...@ho...> - 2002-12-07 12:51:58
|
This is kinda wierd. This works just fine when run from the command line using "python script_name.py" but blows up when run in a CGI fashion. Any ideas why it can't find "comn_free"? ###################################################################### #!/usr/bin/python import Sybase def getDatabases(): db=Sybase.connect('srv','sa','pwd',database='db',auto_commit=1) c=db.cursor() c.execute('select * from corp_defects_td_databases order by database_report_name asc') varDatabases={} for row in c.fetchall(): varDatabases.setdefault(row[0],[]).append(row[1]) varDatabases.setdefault(row[0],[]).append(row[2]) c.close() db.close() outputHTML="Content-type: text/html\n\n" outputHTML+=""" <html> <body><center> <h5>test</h5> </center></body> </html>""" return outputHTML if __name__ == "__main__": print getDatabases() ###################################################################### Error Log: [error] Premature end of script headers: corp_defect_admin.py [error] Traceback (most recent call last): [error] File "/home/tonyb/html/cgi-bin/corp_defect_admin.py", line 3, in ? [error] import Sybase [error] File "/usr/local/python-threads/lib/python2.2/site-packages/Sybase.py", line 20, in ? [error] from sybasect import * [error] ImportError: /usr/local/sybase/lib/libcomn.so: undefined symbol: comn_free Thanks. _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 |
From: Dave C. <dj...@ob...> - 2002-12-04 23:59:56
|
>>>>> "Tony" == Tony Burger <anb...@ho...> writes: Tony> As it turns out a newbie at Sybase as well. It helps to install Tony> the Sybase open-client rpm! Problem solved. LOL! I was about to suggest that you needed to set the SYBASE environment variable. - Dave -- http://www.object-craft.com.au |
From: Tony B. <anb...@ho...> - 2002-12-04 23:00:06
|
As it turns out a newbie at Sybase as well. It helps to install the Sybase open-client rpm! Problem solved. _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Tony B. <anb...@ho...> - 2002-12-04 22:31:22
|
For those who couldn't see/open the install.log: running install running build running build_py not copying Sybase.py (output up-to-date) running build_ext building 'sybasect' extension In file included from blk.c:9: sybasect.h:10:22: cspublic.h: No such file or directory sybasect.h:11:22: ctpublic.h: No such file or directory sybasect.h:12:22: bkpublic.h: No such file or directory In file included from blk.c:9: sybasect.h:100: parse error before "CS_CONTEXT" sybasect.h:100: warning: no semicolon at end of struct or union sybasect.h:109: parse error before '}' token sybasect.h:109: warning: type defaults to `int' in declaration of `CS_CONTEXTObj' sybasect.h:109: warning: data definition has no type or storage class sybasect.h:112: parse error before '*' token sybasect.h:112: warning: type defaults to `int' in declaration of `global_ctx' sybasect.h:112: warning: data definition has no type or storage class sybasect.h:113: parse error before '*' token sybasect.h:113: warning: function declaration isn't a prototype sybasect.h:114: parse error before '*' token sybasect.h:114: warning: function declaration isn't a prototype sybasect.h:115: parse error before "version" sybasect.h:115: warning: function declaration isn't a prototype sybasect.h:119: parse error before "CS_CONTEXTObj" sybasect.h:119: warning: no semicolon at end of struct or union sybasect.h:120: warning: type defaults to `int' in declaration of `conn' sybasect.h:120: warning: data definition has no type or storage class sybasect.h:126: conflicting types for `next' sybasect.h:108: previous declaration of `next' sybasect.h:127: parse error before '}' token sybasect.h:127: warning: type defaults to `int' in declaration of `CS_CONNECTIONObj' sybasect.h:127: warning: data definition has no type or storage class sybasect.h:130: parse error before '*' token sybasect.h:130: warning: function declaration isn't a prototype sybasect.h:131: parse error before '*' token sybasect.h:131: warning: function declaration isn't a prototype sybasect.h:143: parse error before "CS_CONNECTIONObj" sybasect.h:143: warning: no semicolon at end of struct or union sybasect.h:144: warning: type defaults to `int' in declaration of `blk' sybasect.h:144: warning: data definition has no type or storage class sybasect.h:145: parse error before "direction" sybasect.h:145: warning: type defaults to `int' in declaration of `direction' sybasect.h:145: warning: data definition has no type or storage class sybasect.h:148: parse error before '}' token sybasect.h:148: warning: type defaults to `int' in declaration of `CS_BLKDESCObj' sybasect.h:148: warning: data definition has no type or storage class sybasect.h:151: parse error before '*' token sybasect.h:151: warning: function declaration isn't a prototype sybasect.h:156: parse error before "CS_CONNECTIONObj" sybasect.h:156: warning: no semicolon at end of struct or union sybasect.h:157: warning: type defaults to `int' in declaration of `cmd' sybasect.h:157: warning: data definition has no type or storage class sybasect.h:162: parse error before '}' token sybasect.h:162: warning: type defaults to `int' in declaration of `CS_COMMANDObj' sybasect.h:162: warning: data definition has no type or storage class sybasect.h:165: parse error before '*' token sybasect.h:165: warning: function declaration isn't a prototype sybasect.h:166: parse error before '*' token sybasect.h:166: warning: function declaration isn't a prototype sybasect.h:170: parse error before "CS_DATAFMT" sybasect.h:170: warning: no semicolon at end of struct or union sybasect.h:173: parse error before '}' token sybasect.h:173: warning: type defaults to `int' in declaration of `CS_DATAFMTObj' sybasect.h:173: warning: data definition has no type or storage class sybasect.h:177: parse error before '*' token sybasect.h:177: warning: function declaration isn't a prototype sybasect.h:178: parse error before '*' token sybasect.h:178: warning: function declaration isn't a prototype sybasect.h:179: parse error before '*' token sybasect.h:179: warning: function declaration isn't a prototype sybasect.h:180: parse error before '*' token sybasect.h:180: warning: function declaration isn't a prototype sybasect.h:181: parse error before '*' token sybasect.h:181: warning: function declaration isn't a prototype sybasect.h:182: parse error before '*' token sybasect.h:182: warning: function declaration isn't a prototype sybasect.h:185: parse error before '*' token sybasect.h:185: warning: function declaration isn't a prototype sybasect.h:186: parse error before '*' token sybasect.h:186: warning: function declaration isn't a prototype sybasect.h:190: parse error before "CS_IODESC" sybasect.h:190: warning: no semicolon at end of struct or union sybasect.h:192: parse error before '}' token sybasect.h:192: warning: type defaults to `int' in declaration of `CS_IODESCObj' sybasect.h:192: warning: data definition has no type or storage class sybasect.h:198: parse error before '*' token sybasect.h:198: warning: function declaration isn't a prototype sybasect.h:202: parse error before "CS_CONTEXTObj" sybasect.h:202: warning: no semicolon at end of struct or union sybasect.h:204: parse error before '*' token sybasect.h:204: warning: type defaults to `int' in declaration of `locale' sybasect.h:204: warning: data definition has no type or storage class sybasect.h:206: parse error before '}' token sybasect.h:206: warning: type defaults to `int' in declaration of `CS_LOCALEObj' sybasect.h:206: warning: data definition has no type or storage class sybasect.h:210: parse error before '*' token sybasect.h:210: warning: function declaration isn't a prototype sybasect.h:215: parse error before "CS_DATAFMT" sybasect.h:215: warning: no semicolon at end of struct or union sybasect.h:217: parse error before '*' token sybasect.h:217: warning: type defaults to `int' in declaration of `copied' sybasect.h:217: warning: data definition has no type or storage class sybasect.h:218: parse error before '*' token sybasect.h:218: warning: type defaults to `int' in declaration of `indicator' sybasect.h:218: warning: data definition has no type or storage class sybasect.h:220: parse error before '}' token sybasect.h:220: warning: type defaults to `int' in declaration of `DataBufObj' sybasect.h:220: warning: data definition has no type or storage class sybasect.h:228: parse error before "CS_NUMERIC" sybasect.h:228: warning: no semicolon at end of struct or union sybasect.h:229: warning: type defaults to `int' in declaration of `NumericObj' sybasect.h:229: warning: data definition has no type or storage class sybasect.h:233: parse error before '*' token sybasect.h:233: parse error before '*' token sybasect.h:233: warning: type defaults to `int' in declaration of `numeric_alloc' sybasect.h:233: warning: function declaration isn't a prototype sybasect.h:233: warning: data definition has no type or storage class sybasect.h:234: parse error before '*' token sybasect.h:234: warning: function declaration isn't a prototype sybasect.h:243: parse error before "CS_MONEY" sybasect.h:243: warning: no semicolon at end of struct or union sybasect.h:244: warning: type defaults to `int' in declaration of `money4' sybasect.h:244: warning: data definition has no type or storage class sybasect.h:245: warning: type defaults to `int' in declaration of `MoneyUnion' sybasect.h:245: warning: data definition has no type or storage class sybasect.h:250: parse error before "MoneyUnion" sybasect.h:250: warning: no semicolon at end of struct or union sybasect.h:251: warning: type defaults to `int' in declaration of `MoneyObj' sybasect.h:251: warning: data definition has no type or storage class sybasect.h:255: parse error before '*' token sybasect.h:255: parse error before '*' token sybasect.h:255: warning: type defaults to `int' in declaration of `money_alloc' sybasect.h:255: warning: function declaration isn't a prototype sybasect.h:255: warning: data definition has no type or storage class sybasect.h:256: parse error before '*' token sybasect.h:256: warning: function declaration isn't a prototype sybasect.h:268: parse error before "CS_DATETIME" sybasect.h:268: warning: no semicolon at end of struct or union sybasect.h:268: warning: no semicolon at end of struct or union sybasect.h:269: warning: type defaults to `int' in declaration of `datetime4' sybasect.h:269: warning: data definition has no type or storage class sybasect.h:270: warning: type defaults to `int' in declaration of `v' sybasect.h:270: warning: data definition has no type or storage class sybasect.h:271: parse error before "daterec" sybasect.h:271: warning: type defaults to `int' in declaration of `daterec' sybasect.h:271: warning: data definition has no type or storage class sybasect.h:273: parse error before '}' token sybasect.h:273: warning: type defaults to `int' in declaration of `DateTimeObj' sybasect.h:273: warning: data definition has no type or storage class sybasect.h:290: parse error before "CS_CLIENTMSG" sybasect.h:290: warning: no semicolon at end of struct or union sybasect.h:292: parse error before '}' token sybasect.h:292: warning: type defaults to `int' in declaration of `CS_CLIENTMSGObj' sybasect.h:292: warning: data definition has no type or storage class sybasect.h:296: parse error before "CS_SERVERMSG" sybasect.h:296: warning: no semicolon at end of struct or union sybasect.h:298: parse error before '}' token sybasect.h:298: warning: type defaults to `int' in declaration of `CS_SERVERMSGObj' sybasect.h:298: warning: data definition has no type or storage class blk.c:16: parse error before '*' token blk.c:17: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_blk_bind': blk.c:19: `databuf' undeclared (first use in this function) blk.c:19: (Each undeclared identifier is reported only once blk.c:19: for each function it appears in.) blk.c:20: `CS_RETCODE' undeclared (first use in this function) blk.c:20: parse error before "status" blk.c:22: `args' undeclared (first use in this function) blk.c:25: `self' undeclared (first use in this function) blk.c:33: `status' undeclared (first use in this function) blk.c:33: warning: implicit declaration of function `blk_bind' blk.c: At top level: blk.c:114: parse error before '*' token blk.c:115: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_blk_done': blk.c:117: `CS_RETCODE' undeclared (first use in this function) blk.c:117: parse error before "status" blk.c:118: `CS_INT' undeclared (first use in this function) blk.c:120: `args' undeclared (first use in this function) blk.c:123: `self' undeclared (first use in this function) blk.c:132: `status' undeclared (first use in this function) blk.c:132: warning: implicit declaration of function `blk_done' blk.c:132: `outrow' undeclared (first use in this function) blk.c: At top level: blk.c:149: parse error before '*' token blk.c:150: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_blk_drop': blk.c:151: `CS_RETCODE' undeclared (first use in this function) blk.c:151: parse error before "status" blk.c:153: `args' undeclared (first use in this function) blk.c:156: `self' undeclared (first use in this function) blk.c:165: `status' undeclared (first use in this function) blk.c:165: warning: implicit declaration of function `blk_drop' blk.c:171: `CS_SUCCEED' undeclared (first use in this function) blk.c: At top level: blk.c:182: parse error before '*' token blk.c:183: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_blk_init': blk.c:186: `CS_RETCODE' undeclared (first use in this function) blk.c:186: parse error before "status" blk.c:188: `args' undeclared (first use in this function) blk.c:191: `self' undeclared (first use in this function) blk.c:199: `status' undeclared (first use in this function) blk.c:199: warning: implicit declaration of function `blk_init' blk.c:199: `CS_NULLTERM' undeclared (first use in this function) blk.c: In function `property_type': blk.c:217: `BLK_IDENTITY' undeclared (first use in this function) blk.c: At top level: blk.c:250: parse error before '*' token blk.c:251: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_blk_props': blk.c:254: `CS_RETCODE' undeclared (first use in this function) blk.c:254: parse error before "status" blk.c:255: `CS_INT' undeclared (first use in this function) blk.c:256: `CS_BOOL' undeclared (first use in this function) blk.c:257: `CS_NUMERIC' undeclared (first use in this function) blk.c:259: `args' undeclared (first use in this function) blk.c:262: `self' undeclared (first use in this function) blk.c:268: `CS_SET' undeclared (first use in this function) blk.c:275: `bool_value' undeclared (first use in this function) blk.c:282: `status' undeclared (first use in this function) blk.c:282: warning: implicit declaration of function `blk_props' blk.c:283: `CS_UNUSED' undeclared (first use in this function) blk.c:297: `int_value' undeclared (first use in this function) blk.c:328: parse error before ')' token blk.c:332: `CS_MAX_PREC' undeclared (first use in this function) blk.c:332: warning: unused variable `text' blk.c:351: `CS_GET' undeclared (first use in this function) blk.c:398: `numeric_value' undeclared (first use in this function) blk.c:405: warning: unused variable `text' blk.c: At top level: blk.c:463: parse error before '*' token blk.c:464: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_blk_rowxfer': blk.c:465: `CS_RETCODE' undeclared (first use in this function) blk.c:465: parse error before "status" blk.c:467: `args' undeclared (first use in this function) blk.c:470: `self' undeclared (first use in this function) blk.c:478: `status' undeclared (first use in this function) blk.c:478: warning: implicit declaration of function `blk_rowxfer' blk.c: At top level: blk.c:609: parse error before '*' token blk.c:610: warning: function declaration isn't a prototype blk.c: In function `bulk_alloc': blk.c:611: `self' undeclared (first use in this function) blk.c:617: parse error before ')' token blk.c:625: request for member `debug' in something not a structure or union blk.c:659: `CS_SUCCEED' undeclared (first use in this function) blk.c: At top level: blk.c:662: parse error before '*' token blk.c:663: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_dealloc': blk.c:680: `self' undeclared (first use in this function) blk.c: At top level: blk.c:687: parse error before ')' token blk.c:687: initializer element is not constant blk.c:687: (near initialization for `CS_BLKDESC_memberlist[0].offset') blk.c:687: initializer element is not constant blk.c:687: (near initialization for `CS_BLKDESC_memberlist[0]') blk.c:688: parse error before ')' token blk.c:688: initializer element is not constant blk.c:688: (near initialization for `CS_BLKDESC_memberlist[1].offset') blk.c:688: initializer element is not constant blk.c:688: (near initialization for `CS_BLKDESC_memberlist[1]') blk.c:689: parse error before ')' token blk.c:689: initializer element is not constant blk.c:689: (near initialization for `CS_BLKDESC_memberlist[2].offset') blk.c:689: initializer element is not constant blk.c:689: (near initialization for `CS_BLKDESC_memberlist[2]') blk.c:690: initializer element is not constant blk.c:690: (near initialization for `CS_BLKDESC_memberlist[3]') blk.c:693: parse error before '*' token blk.c:694: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_getattr': blk.c:697: `self' undeclared (first use in this function) blk.c:697: `name' undeclared (first use in this function) blk.c: At top level: blk.c:704: parse error before '*' token blk.c:705: warning: function declaration isn't a prototype blk.c: In function `CS_BLKDESC_setattr': blk.c:706: warning: comparison between pointer and integer blk.c:710: `self' undeclared (first use in this function) blk.c:710: `name' undeclared (first use in this function) blk.c:710: warning: passing arg 4 of `PyMember_Set' makes pointer from integer without a cast gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -DWANT_BULKCOPY -I/usr/local/sybase/include -I/usr/local/python-threads/include/python2.2 -c blk.c -o build/temp.linux-i686-2.2/blk.o error: command 'gcc' failed with exit status 1 _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Tony B. <anb...@ho...> - 2002-12-04 22:20:44
|
Hello, I'm a newbie to this module and ran into some install problems. My system includes: Mandrake Linux 9.0 GCC 3.2 Python 2.2.2 (installed myself from source) Sybase 11.9.2 (sybase-ase-11.9.2-3.i386.rpm and sybase-common-11.9.2-3.i386.rpm) I'm attaching the install.log (opens in Wordpad for win users). Python is compiled with threads and I have tried the -U WANT_BULKCOPY option as well. I do not have the libblk library which the setup.py file seems to look for. Any thoughts? Thanks! _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Marcos P. <msa...@gr...> - 2002-12-04 14:02:28
|
VB seems to store these in a connection-level variable and/or associate callback/event procedures. It might be a good solution, especially for warnings and informative messages. El vie, 29-11-2002 a las 06:00, Dave Cole escribi=F3: > >>>>> "hopfgartner" =3D=3D hopfgartner <hop...@ro...> writes: >=20 > >> You don't say whether or not you are using FreeTDS. I also get > >> segfaults in FreeTDS 0.60 when I try to call stored procedures. I > >> have not tried the current CVS version of FreeTDS. Something to > >> try a bit later. > >>=20 > hopfgartner> Sorry, I've forgot to mention it. Indeed, I'm using > hopfgartner> FreeTDS 0.6. >=20 > That helps a bit. >=20 > >> Is it an error to have the stored procedure error message reported > >> as an exception? > >>=20 > hopfgartner> This should not be an error from the SQL server, but I > hopfgartner> will look closer to it. This is simply a message telling > hopfgartner> that there are no FK referencing this table. When running > hopfgartner> from Query Analyser, this message appears in the > hopfgartner> 'Messages' tab, wheras results are in the 'Grid' tab. >=20 > That raises the question of what I should do with messages from the > stored procedure. Should I simply discard the messages? >=20 > hopfgartner> The same stored procedure does not give any error > hopfgartner> messages when run from Query Analyser. >=20 > It would be really helpful if you could send a fragment of SQL (no > matter how trivial) that I could run here to set up the exactly same > situation that you are seeing. >=20 > - Dave --=20 Marcos S=E1nchez Provencio <msa...@gr...> www.burke.es |