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: Nicholas V. <nic...@pl...> - 2003-04-19 16:00:24
|
I am using FreeTDS 0.61 I am doing a basic bind with parameters and I am getting an error. cursor =3D conn.cursor() comps =3D ('a', 'b', 'c') for comp in comps: cursor.execute("SELECT id, queuetype FROM Components WHERE id = =3D '@' ", {'@n' : comp} ) (c,qtype) =3D cursor.fetchone() print comp, qtype cursor.close() My results are thus... Traceback (most recent call last): File "./DB.py", line 69, in ? _query3(conn) File "./DB.py", line 56, in _query3 cursor.execute("SELECT id, queuetype FROM Components WHERE id =3D = '@n'", { '@n' : comp} ) File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 380, in = execute self._raise_error(Error, 'ct_param') File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 310, in = _raise_error raise exc(text) Sybase.Error: ct_param Any thoughts? Thanx Nicholas |
From: Nicholas V. <nic...@pl...> - 2003-04-19 14:50:49
|
So I am using FreeTDS with Python and Sybase.py. I am do a connection, cursor, execute a query and can fetch the results = of the query. All that works. But when I go to change the code to check the rowcount for the status of = the query,=20 it is always -1. Should it not be set to the number of rows in the = query, which for my query is like 50. Here is the code (basically): conn =3D Sybase.connect( cfg['dsn'], cfg['user'], cfg['pass'] ) cursor =3D conn.cursor() cursor.execute ("SELECT id, queuetype FROM Components") print "XXX: rowcount:", cursor.rowcount while (1): row =3D cursor.fetchone() if row =3D=3D None: break print row connect.close() Thanx Nicholas |
From: Chris C. <ccc...@ya...> - 2003-04-19 07:19:48
|
Hi all, I'm playing with the Sybase-Python interface (0.35), and I can't seem to figure out how to get past a statement that gives an informational error. Here's my code fragment: sql = "exec sp_foreignkey 'ccc_test', 'sysobjects', 'b'" query = conn.cursor() try: query.callproc("sp_foreignkey" , ["ccc_test", "sysobjects", "b"]) except Sybase.DatabaseError, e: print e conn.execute("select * from sysobjects") and here is what I get Level 10, State 1, Procedure sp_foreignkey, Line 559 New foreign key added. Traceback (most recent call last): File "Table.py", line 233, in ? conn.execute("select * from sysobjects") File "/usr/local/lib/python2.2/site-packages/Sybase.py", line 724, in execute status = 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(): user api layer: external error: This routine cannot be called because another command structure has results pending. So, how can I clear the connection (preferably by using a callback handler)? I tried adding rows = query.fetchall(), but that fails with a different error. ===== Chris Curvey Curvey Consulting http://www.chriscurvey.com __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com |
From: Rocky B. <ro...@at...> - 2003-04-14 09:30:28
|
Well, the interpreter wasn't crashing, but was hanging. In any event, I actually tracked down the problem. The issue was that i was reusing the same cursor instance amongst different threads. And as Sybase.threadsafety identifieds, cursors are not threadsafe. Once I stopped reusing cursors, all was well. I haven't had a single hang since. Regards, Rocky > --------- Original Message --------- > From: Eric Uski [mailto:e_...@ho...] > Sent: April 13, 2003 13:09:55 +0200 > To: Sha...@in..., roc...@br..., pyt...@ob... > Subject: Re: [python-sybase] sybase connection hanging > > > Hello, > > I had some problems like that. The only way I found to prevent the Python > interpreter to crash is to remove the line for the server callback messages > in Sybase.py. the line is: > _ctx.ct_callback(CS_SET, CS_SERVERMSG_CB, _servermsg_cb) > > eric > > ----- Original Message ----- > From: <Sha...@in...> > To: <roc...@br...>; <pyt...@ob...> > Sent: Sunday, April 13, 2003 10:21 AM > Subject: RE: [python-sybase] sybase connection hanging > > > Rocky, > > You've got to give us some more meat here to get any real help. > What are you doing with the database? Are you playing games with > threads? Transactions? The kind of symptom you describe is typical > for database locking problems, but I don't think you'll get anything > more specific without some details. > > Have fun, > Shai. > > > -----Original Message----- > From: Rocky Burt [mailto:roc...@br...] > Sent: Thursday, April 10, 2003 20:09 > To: pyt...@ob... > Subject: [python-sybase] sybase connection hanging > > > All, > > Every so often I'm finding my sybase connection hanging. And its > hanging to a point where the only way to stop the python app is to 'kill > -9' the python interpreter. > > My setup is as follows: > Server: Solaris(sparc) 8 with Sybase ASE 12.5 > Machine Running Application: Redhat Linux 8.0 (intel), Python 2.1.3 > > This happens with Sybase drivers 0.35 and 0.36pre6. > > Anyone have any ideas? > > Regards, > Rocky > > > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Eric U. <e_...@ho...> - 2003-04-14 04:11:57
|
Hello, I had some problems like that. The only way I found to prevent the Python interpreter to crash is to remove the line for the server callback messages in Sybase.py. the line is: _ctx.ct_callback(CS_SET, CS_SERVERMSG_CB, _servermsg_cb) eric ----- Original Message ----- From: <Sha...@in...> To: <roc...@br...>; <pyt...@ob...> Sent: Sunday, April 13, 2003 10:21 AM Subject: RE: [python-sybase] sybase connection hanging Rocky, You've got to give us some more meat here to get any real help. What are you doing with the database? Are you playing games with threads? Transactions? The kind of symptom you describe is typical for database locking problems, but I don't think you'll get anything more specific without some details. Have fun, Shai. -----Original Message----- From: Rocky Burt [mailto:roc...@br...] Sent: Thursday, April 10, 2003 20:09 To: pyt...@ob... Subject: [python-sybase] sybase connection hanging All, Every so often I'm finding my sybase connection hanging. And its hanging to a point where the only way to stop the python app is to 'kill -9' the python interpreter. My setup is as follows: Server: Solaris(sparc) 8 with Sybase ASE 12.5 Machine Running Application: Redhat Linux 8.0 (intel), Python 2.1.3 This happens with Sybase drivers 0.35 and 0.36pre6. Anyone have any ideas? Regards, Rocky _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: <Sha...@in...> - 2003-04-14 01:21:47
|
Rocky, You've got to give us some more meat here to get any real help. What are you doing with the database? Are you playing games with threads? Transactions? The kind of symptom you describe is typical for database locking problems, but I don't think you'll get anything more specific without some details. Have fun, Shai. -----Original Message----- From: Rocky Burt [mailto:roc...@br...]=20 Sent: Thursday, April 10, 2003 20:09 To: pyt...@ob... Subject: [python-sybase] sybase connection hanging All, Every so often I'm finding my sybase connection hanging. And its hanging to a point where the only way to stop the python app is to 'kill -9' the python interpreter. My setup is as follows: Server: Solaris(sparc) 8 with Sybase ASE 12.5 Machine Running Application: Redhat Linux 8.0 (intel), Python 2.1.3 This happens with Sybase drivers 0.35 and 0.36pre6. Anyone have any ideas? Regards, Rocky _______________________________________________ Python-sybase mailing list Pyt...@ob... https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Rocky B. <roc...@br...> - 2003-04-11 10:09:07
|
All, Every so often I'm finding my sybase connection hanging. And its hanging to a point where the only way to stop the python app is to 'kill -9' the python interpreter. My setup is as follows: Server: Solaris(sparc) 8 with Sybase ASE 12.5 Machine Running Application: Redhat Linux 8.0 (intel), Python 2.1.3 This happens with Sybase drivers 0.35 and 0.36pre6. Anyone have any ideas? Regards, Rocky |
From: Purcell, J. (MTVi) <Pur...@mt...> - 2003-04-04 17:30:33
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 6.0.6249.1"> <TITLE>ct_connect threading issue?</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format --> <P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">I've been trying to use the Sybase = module with Python 2.2.2 on Win32 (W2K to be exact) w/ Sybase 11.9.2 and = on Solaris 2.8 64 bit on Sybase 12.5. It seems that it dies with a = thread access violation and aborts the interpreter. I've tracked down = the issue and it dies in</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial"> status =3D = ct_connect(self->conn, dsn, CS_NULLTERM); on line 310 of conn.c. = </FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">It seem that this method isn't thread = safe, from the Open Clien ref manual: </FONT> </P> <P><B><FONT SIZE=3D2 FACE=3D"Arial">Note</FONT></B> <FONT SIZE=3D2 = FACE=3D"Times New Roman">If ct_connect is called in the entry funtions = of a DLL, a deadlock</FONT> <BR><FONT SIZE=3D2 FACE=3D"Times New Roman">may arise. This system = creates OS threads and tries to synchronize them</FONT> <BR><FONT SIZE=3D2 FACE=3D"Times New Roman">using system utilities. This = synchronization conflicts with the operating</FONT> <BR><FONT SIZE=3D2 FACE=3D"Times New Roman">system’s serialization = process.</FONT> </P> <P><FONT SIZE=3D2 FACE=3D"Arial">Too bad it doesn't explain a work = around :) Oddly enough, if I just use 32 bit mode on Solaris and only = use the 32 bit 11.9.2 driver it works fine (which would make sense since = the threading models are different).</FONT></P> <P><FONT SIZE=3D2 FACE=3D"Arial">Any help would be greatly appriciated = (stack traces on request for Win32, Core files on Solaris).</FONT> <BR><FONT SIZE=3D2 FACE=3D"Arial">JP</FONT> </P> <BR> </BODY> </HTML> |
From: Rocky B. <roc...@br...> - 2003-04-04 14:08:38
|
All, I started out using FreeTDS to connect to Sybase. I quickly ran into a previously mentioned (on this mailing list) ct_param error. According to a previous post on this list, it appears that FreeTDS' ct_param stuff doesn't work so essentially I can't use FreeTDS if i want to pass in complicated parameters (like blobs and such). So, my question then, is what Sybase client lib should I be using? And, is there a download link where I could get that client lib? (I need support for ASE 11.x - 12.x) ps. I'm subscribed to this list so please copy me directly when replying. Regards, Rocky |
From: Paul R. <pau...@at...> - 2003-03-21 16:59:04
|
Hello, I have been using the Python Sybase driver and FreeTDS to talk to MS Sqlserver 2000. I recently had to upgrade Sybase.py (to 0.36pre6) and FreeTDS, but unfortunately this has caused some instability in my code. I have managed to work around it, but it is kind of a hack, so I am hoping we can fix it properly. Below is a reposting of the final message in the thread on the FreeTDS list. I would be happy to forward all of them. Basically, the problem seems to be that Sqlserver sends spurious packets. FreeTDS passes those up the chain because it does not know any better, and Sybase.py gets confused. I am happy to try various things, but I don't know a lot about the TDS protocol and CT library. Any suggestions? Thanks, Paul Rensing -----Forwarded Message----- From: "Lowden, James K" <Low...@be...> To: 'FreeTDS Development Group' <fr...@li...> Subject: RE: [freetds] Help: MSSql/FreeTDS/Python now unstable Date: 18 Mar 2003 13:32:12 -0500 > From: Paul Rensing [mailto:pau...@at...] > Sent: March 18, 2003 11:56 AM > > The Python Sybase driver uses the CT interface. I turned on > debugging of > the Python driver in the place where it usually fails. I have attached > the output of the tracing. > > The problem seems to be that, for the SQL query, occasionally it gets > back from ct_results() a status of CS_STATUS_RESULT, instead of the > usual CS_ROW_RESULT. After that it is very confused. If I immediately > repeat the same query, it works just fine. > > I am still wondering if this could be a timing issue on the > server end. Microsoft servers issue spurious status result packets, far more than they need to. FreeTDS can't know which ones are real and which are noise, so it passes them all up the stack. I don't know that it's a timing issue, exactly; I haven't found rhyme or reason. The Python folks wouldn't have bumped into this using Sybase's libraries because they likely wouldn't have tried to connect to a Microsoft server (and, even if they did, it would be TDS 4.2 and, as you say, the behavior is sporadic). FreeTDS is violating the ct-lib specification IMO, because it's returning CS_STATUS_RESULT for a query that's not a stored procedure. The problem is, we don't know it's not a stored procedure (because we don't parse the outbound SQL), so we don't know the returned status packet should be squelched from the ct-lib interface. If I'm right about all this, I'm afraid Python's just going to have to deal. :/ Nice detective work, if I may say so. --jkl The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions. _______________________________________________ FreeTDS mailing list Fr...@li... http://lists.ibiblio.org/mailman/listinfo/freetds -- Paul Rensing <pau...@at...> |
From: Marcos P. <msa...@gr...> - 2003-03-08 03:31:58
|
You may try using an explicit set of columns instead of * to see if it is one in particular that causes this error. El vie, 07 de 03 de 2003 a las 05:27, Ashley Glassel escribi=F3: >=20 > using code: >=20 > import Sybase > try: > s =3D Sybase.connect('Oscar', 'docent', 'docent') > cur =3D s.cursor() > cur.execute("select * from docent.DRUser where lastName =3D 'Glas= sel'") > print cur.description > for tup in cur.description: > print tup[0], > print > while 1: > rec =3D cur.fetchall() > if not rec: break > print rec > except NameError,e: > print 'error ', e, 'undefined' >=20 >=20 > i get this error: >=20 > Traceback (most recent call last): > File "one.py", line 11, in ? > rec =3D cur.fetchall() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchal= l > row =3D self.fetchone() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 413, in fetchon= e > _array =3D _fetch_rows(self._cmd, self._bufs) > File "/usr/lib/python2.2/site-packages/Sybase.py", line 199, in _fetch_= rows > raise Error('ct_fetch') > Sybase.Error: ct_fetch >=20 >=20 > the description part works, why can't I print the record?? >=20 > -regards >=20 > Ashley=20 >=20 > ----- End forwarded message ----- > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase --=20 gpg --recv-keys --keyserver wwwkeys.pgp.net B9AD9B1B |
From: Ashley G. <ash...@op...> - 2003-03-08 01:11:55
|
my apologies, for the lack of title in the last message. ----- Forwarded message from Ashley Glassel <ash...@op...= > ----- Date: Fri, 7 Mar 2003 15:25:13 +1100 From: Ashley Glassel <ash...@op...> To: python-sybase <pyt...@ob...> Organisation: Poor User-Agent: Mutt/1.2.5.1i using code: import Sybase try: s =3D Sybase.connect('Oscar', 'docent', 'docent') cur =3D s.cursor() cur.execute("select * from docent.DRUser where lastName =3D 'Glasse= l'") print cur.description for tup in cur.description: print tup[0], print while 1: rec =3D cur.fetchall() if not rec: break print rec except NameError,e: print 'error ', e, 'undefined' i get this error: Traceback (most recent call last): File "one.py", line 11, in ? rec =3D cur.fetchall() File "/usr/lib/python2.2/site-packages/Sybase.py", line 489, in fetchall row =3D self.fetchone() File "/usr/lib/python2.2/site-packages/Sybase.py", line 413, in fetchone _array =3D _fetch_rows(self._cmd, self._bufs) File "/usr/lib/python2.2/site-packages/Sybase.py", line 199, in _fetch_ro= ws raise Error('ct_fetch') Sybase.Error: ct_fetch the description part works, why can't I print the record?? -regards Ashley=20 ----- End forwarded message ----- |
From: Ashley G. <ash...@op...> - 2003-03-08 01:09:00
|
using code: import Sybase try: s = Sybase.connect('Oscar', 'docent', 'docent') cur = s.cursor() cur.execute("select * from docent.DRUser where lastName = 'Glassel'") print cur.description for tup in cur.description: print tup[0], print while 1: rec = cur.fetchall() if not rec: break print rec except NameError,e: print 'error ', e, 'undefined' i get this error: Traceback (most recent call last): File "one.py", line 11, in ? rec = cur.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 413, in fetchone _array = _fetch_rows(self._cmd, self._bufs) File "/usr/lib/python2.2/site-packages/Sybase.py", line 199, in _fetch_rows raise Error('ct_fetch') Sybase.Error: ct_fetch the description part works, why can't I print the record?? -regards Ashley |
From: David C. <da...@ne...> - 2003-03-06 16:53:36
|
On 3/5/03 4:12 PM, "David Casti" <da...@ne...> wrote: > Sybase.DatabaseError: Layer: 6, Origin: 8 > ct_connect(): directory service layer: internal directory control layer > error: There was an error encountered while binding to the directory > service. Explanation for this error can be found at http://manuals.sybase.com/onlinebooks/group-cn/cng1110e/ocerrors/@Generic__B ookTextView/6293 Turns out that the interfaces file on this server was not correctly populated... once I corrected that problem, everything worked. David. |
From: David C. <da...@ne...> - 2003-03-06 16:12:51
|
Hello, I have been using the sybase module to connect to my local Sybase server for a few weeks. Now I am trying to use it to connect to a non-local server on port 3105. I thought the correct call was something like -- d = Sybase.connect( 'hosttname:3105', user='user', passwd='pass', database='dbname' ) -- but after many different attempts at that command, I keep getting the error -- Sybase.DatabaseError: Layer: 6, Origin: 8 ct_connect(): directory service layer: internal directory control layer error: There was an error encountered while binding to the directory service. -- Can anyone advise me on how to overcome this problem? Thanks, David. |
From: Marcos P. <msa...@gr...> - 2003-02-25 15:10:19
|
I should have tried first; it seems to work just by initialising the locale import locale locale.setlocale(locale.LC_ALL, '') El mi=E9, 19-02-2003 a las 13:28, Marcos S=E1nchez Provencio escribi=F3: > Hi there. >=20 > =BFIs it possible to issue a query such as "select 'a=F1o' "? (in case it > does not show, between the a and the o there is a n with a ~ on top, a > very usual char in Spain/Espa=F1a). >=20 > It works from tsql (include with freetds):: >=20 > marcos@cynar:/usr/local/Webware/WebKit$ tsql -Scazalla -Usa > locale is "es_ES@euro" > charset is "ISO-8859-15" > Password:=20 > Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 > Changed language setting to us_english. > 1> select 'a=F1o' > 2> go >=20 > a=F1o >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Using Python >=20 > SELECT 'a=F1o' from usuarios=20 > Traceback (most recent call last): > File "etcPythonSybase.py", line 227, in ? > rs=3Dcon.lookup(sql) > File "etcPythonSybase.py", line 203, in lookup > cur,con=3Dself.lookupRS(sql,params) > File "etcPythonSybase.py", line 122, in lookupRS > cur.execute(sql) > File "/usr/lib/python2.2/site-packages/Sybase.py", line 381, in > execute > self._start_results() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 547, in > _start_results > status, result =3D self._cmd.ct_results() > File "/usr/lib/python2.2/site-packages/Sybase.py", line 145, in > _servermsg_cb > raise DatabaseError(_fmt_server(msg)) > Sybase.DatabaseError: Msg 105, Level 15, State 1, Line 1 > Unclosed quotation mark before the character string > 'a???????????????..?'.Msg 170, Level 15, State 1, Line 1 > Line 1: Incorrect syntax near 'a???????????????..?'. > =3D=3D=3D=3D >=20 > I appreciate any pointers. The client is linux, freetds, the server is > SQL2000. >=20 > --=20 > Marcos S=E1nchez Provencio <ra...@ar...> >=20 > _______________________________________________ > Python-sybase mailing list > Pyt...@ob... > https://object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase |
From: Marcos P. <ra...@ar...> - 2003-02-25 10:53:21
|
I have changed _servermsg_cb to ignore non-errors, since I was getting a nasty raise DatabaseError(_fmt_server(msg)) DatabaseError: Msg 8153, State 1, Procedure usp_VsIntervinientes, Line 74 Warning: Null value eliminated from aggregate. This is the new version: def _servermsg_cb(ctx, conn, msg): print '_servermsg_cb:',msg.severity,msg.line, msg.msgnumber, msg.proc, msg.severity, msg.state, msg.status, msg.svrname,msg.text #if msg.msgnumber not in (5701, 5703): if msg.severity: raise DatabaseError(_fmt_server(msg)) Is it too permissive? -- Marcos Sánchez Provencio <ra...@ar...> |
From: Dave C. <dj...@ob...> - 2003-02-24 23:37:09
|
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. NOTES: This is another incremental improvement to FreeTDS support. You can build for FreeTDS like this: python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY python setup.py install If you are using FreeTDS 0.60 change the compile command to: python setup.py build_ext -D HAVE_FREETDS=60 -U WANT_BULKCOPY The module is available here: http://www.object-craft.com.au/projects/sybase/download/sybase-0.36pre6.tar.gz The module home page is here: http://www.object-craft.com.au/projects/sybase/ CHANGES SINCE 0.36pre5: * Fixed compilation for non-FreeTDS users. CHANGES SINCE 0.35: * Fixed bug in ctx.c:ct_con_drop() which caused SEGFAULT with FreeTDS. * Export version of FreeTDS used in sybasect.__have_freetds__ * Set Sybase._ctx as the global context soon as in Sybase.py to avoid problems with undefined global ctx. * Look for SYBASE_OCS on all platforms. * Fixed spelling error in ctx.c:global_ctx(). * Fixed cursor locking bug with .nextset() method. * Added .debug_msg() method to context type which writes to the debug log when debugging is enabled for the context object. * Merged AIX build changes from Dietmar Rothkamp. * Now compiles with FreeTDS 0.61. * Limit size of TEXT fields to 65536. * Removed references to CS_PENDING and CS_BUSY in Sybase.py. * Bind CS_VARBINARY_TYPE as CS_BINARY_TYPE. * Do not attempt to ct_cancel() when handling an exception if have not connected to the server. Bug fix in Sybase.py. * Seems like FreeTDS reports the wrong maxlength in ct_describe() for CS_NUMERIC_TYPE and CS_DECIMAL_TYPE. Ignore FreeTDS and assume a maxlength of sizeof(CS_NUMERIC). Bugfix in databuf.c. * Use correct T_STRING_INPLACE type in structure member descriptions. The code does not use Python API for these members. * Debug output for DataFmt now includes scale and precision. * More definitions added to freetds.h; CS_SRC_VALUE, CS_CLEAR. -- http://www.object-craft.com.au |
From: Dave C. <dj...@ob...> - 2003-02-24 01:14:45
|
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. NOTES: This is another incremental improvement to FreeTDS support. You can build for FreeTDS 0.61 like this: python setup.py build_ext -D HAVE_FREETDS -U WANT_BULKCOPY python setup.py install For FreeTDS 0.60 you should do this: python setup.py build_ext -D HAVE_FREETDS=60 -U WANT_BULKCOPY The module is available here: http://www.object-craft.com.au/projects/sybase/download/sybase-0.36pre5.tar.gz The module home page is here: http://www.object-craft.com.au/projects/sybase/ CHANGES SINCE 0.36pre4: * Fixed bug in ctx.c:ct_con_drop() which caused SEGFAULT with FreeTDS. * Export version of FreeTDS used in sybasect.__have_freetds__ * Set Sybase._ctx as the global context soon as in Sybase.py to avoid problems with undefined global ctx. * Look for SYBASE_OCS on all platforms. * Fixed spelling error in ctx.c:global_ctx(). CHANGES SINCE 0.35: * Fixed cursor locking bug with .nextset() method. * Added .debug_msg() method to context type which writes to the debug log when debugging is enabled for the context object. * Merged AIX build changes from Dietmar Rothkamp. * Now compiles with FreeTDS 0.61. * Limit size of TEXT fields to 65536. * Removed references to CS_PENDING and CS_BUSY in Sybase.py. * Bind CS_VARBINARY_TYPE as CS_BINARY_TYPE. * Do not attempt to ct_cancel() when handling an exception if have not connected to the server. Bug fix in Sybase.py. * Seems like FreeTDS reports the wrong maxlength in ct_describe() for CS_NUMERIC_TYPE and CS_DECIMAL_TYPE. Ignore FreeTDS and assume a maxlength of sizeof(CS_NUMERIC). Bugfix in databuf.c. * Use correct T_STRING_INPLACE type in structure member descriptions. The code does not use Python API for these members. * Debug output for DataFmt now includes scale and precision. * More definitions added to freetds.h; CS_SRC_VALUE, CS_CLEAR. -- http://www.object-craft.com.au |
From: David C. <da...@ne...> - 2003-02-21 09:20:01
|
Hello, I have just installed Sybase ASE 12.5.0.2 on my MacOS X 10.2.4 box, and have no problems building the sybase module (with SYBASE=/Applications/Sybase/System/OCS-12_5), but when I try to use the module, I get this error -- Python 2.3a1 (#1, Jan 26 2003, 21:54:53) [GCC 3.1 20020420 (prerelease)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import Sybase Traceback (most recent call last): File "<stdin>", line 1, in ? File "Sybase.py", line 20, in ? from sybasect import * ImportError: Failure linking new module: /usr/local/lib/libct.dylib: dyld: python version mismatch for library: /usr/local/lib/libct.dylib (compatibility version of user: 12.5.0 greater than library's version: 2.0.0) -- any thoughts on how I can correct this problem? Thanks, David. |
From: Marcos P. <ra...@ar...> - 2003-02-21 03:50:27
|
I believe autocommit is silently wrong in MSSQL. It seems that executing conn.execute('set implicit_transactions on') after connecting (where conn is the connection returned by Sybase.connect) works fine. -- Marcos Sánchez Provencio <ra...@ar...> |
From: Marcos P. <ra...@ar...> - 2003-02-21 03:46:13
|
This is the output (please let me know if I can help you (me :-) in any way. This is the interactive tsql session marcos@cynar:~/src$ tsql -Usa -Scazalla locale is "es_ES@euro" charset is "ISO-8859-15" Password: Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 Changed language setting to us_english. 1> use personal 2> go 1> select 'año' 2> go año El jue, 20 de 02 de 2003 a las 00:09, Dave Cole escribió: > >>>>> "Marcos" == Marcos Sánchez Provencio <ra...@ar...> writes: > > ______________________________________________________________________ > > Marcos> Hi there. ¿Is it possible to issue a query such as "select > Marcos> 'año' "? (in case it does not show, between the a and the o > Marcos> there is a n with a ~ on top, a very usual char in > Marcos> Spain/España). > > Marcos> It works from tsql (include with freetds):: > > It might be instructive to turn on FreeTDS debug logging and then run > both the tsql and Sybase module again. > > The TDSDUMP environment variable specifies the name of a log file and > turns on debugging (I think). > > - Dave -- Marcos Sánchez Provencio <ra...@ar...> |
From: Dave C. <dj...@ob...> - 2003-02-20 18:09:45
|
>>>>> "Marcos" =3D=3D Marcos S=E1nchez Provencio <ra...@ar...> writes: |
From: Dave C. <dj...@ob...> - 2003-02-20 17:53:22
|
> What is the current status regarding parameter passing with > freetds/MSSQL2000? I get an error if I try simple queries. > > import Sybase as dbapi > > con=dbapi.connect('cazalla','gotta','password','personal') > cur=con.cursor() > cur.execute('select * from usuarios where cd_usuario=@u', > {'@u':'marcos'}) > pprint.pprint(cur.fetchall()) > > This is what I get (line numbers are incorrect) > > Traceback (most recent call last): > File "etcPythonSybase.py", line 191, in ? > cur.execute('select * from usuarios where > cd_usuario=@u',{'@u':'marcos'}) > File "/usr/lib/python2.2/site-packages/Sybase.py", line 379, in > execute > self._raise_error(Error, 'ct_param') > File "/usr/lib/python2.2/site-packages/Sybase.py", line 309, in > _raise_error > raise exc(text) > Sybase.Error: ct_param I think it still has issues. :-) Looking at the FreeTDS 0.61 source for ct_param(): CS_RETCODE ct_param(CS_COMMAND * cmd, CS_DATAFMT * datafmt, CS_VOID * data, CS_INT datalen, CS_SMALLINT indicator) { TDSSOCKET *tds; TDSDYNAMIC *dyn; /* TDSINPUTPARAM param; */ tdsdump_log(TDS_DBG_FUNC, "%L inside ct_param()\n"); tdsdump_log(TDS_DBG_INFO1, "%L ct_param() data addr = %d data length = %d\n", data, datalen); tds = cmd->con->tds_socket; dyn = tds_lookup_dynamic(tds, cmd->dyn_id); /* TODO */ return CS_FAIL; /* dyn = tds->dyns[elem]; param = tds_add_input_param(dyn); param->column_type = _ct_get_server_type(datafmt->datatype); param->varaddr = data; if (datalen==CS_NULLTERM) { param->column_bindlen = 0; } else { param->column_bindlen = datalen; } param->is_null = indicator; return CS_SUCCEED; */ } Note that the code which would actually do something is commented out and the function unconditionally returns CS_FAIL. So for the being, you cannot pass parameters to Cursor.execute() or Cursor.callproc(), you must build a query string which does not use parameters. If I was really clever I would make Sybase.py adapt to the presense of FreeTDS and turn have it shield you from that limitation in FreeTDS. - Dave -- http://www.object-craft.com.au |
From: Marcos P. <ra...@ar...> - 2003-02-20 07:28:17
|
Hi there. ¿Is it possible to issue a query such as "select 'año' "? (in case it does not show, between the a and the o there is a n with a ~ on top, a very usual char in Spain/España). It works from tsql (include with freetds):: marcos@cynar:/usr/local/Webware/WebKit$ tsql -Scazalla -Usa locale is "es_ES@euro" charset is "ISO-8859-15" Password: Msg 5703, Level 0, State 1, Server CAZALLA, Line 0 Changed language setting to us_english. 1> select 'año' 2> go año =================== Using Python SELECT 'año' from usuarios Traceback (most recent call last): File "etcPythonSybase.py", line 227, in ? rs=con.lookup(sql) File "etcPythonSybase.py", line 203, in lookup cur,con=self.lookupRS(sql,params) File "etcPythonSybase.py", line 122, in lookupRS cur.execute(sql) File "/usr/lib/python2.2/site-packages/Sybase.py", line 381, in execute self._start_results() File "/usr/lib/python2.2/site-packages/Sybase.py", line 547, in _start_results status, result = self._cmd.ct_results() File "/usr/lib/python2.2/site-packages/Sybase.py", line 145, in _servermsg_cb raise DatabaseError(_fmt_server(msg)) Sybase.DatabaseError: Msg 105, Level 15, State 1, Line 1 Unclosed quotation mark before the character string 'a???????????????..?'.Msg 170, Level 15, State 1, Line 1 Line 1: Incorrect syntax near 'a???????????????..?'. ==== I appreciate any pointers. The client is linux, freetds, the server is SQL2000. -- Marcos Sánchez Provencio <ra...@ar...> |