From gilcneth at earthlink.net Thu Jan 4 11:52:36 2007 From: gilcneth at earthlink.net (gilcneth@earthlink.net) Date: Thu Jan 4 17:52:40 2007 Subject: [egenix-users] Basic tsql example using MxODBC Zope DA adaptor? Message-ID: <410-2200714416523693@earthlink.net> Hello Everyone, I am relatively new to Zope/Plone, as well as the MxODBC Zope DA adaptor. I am wondering if someone could point me to a basic example that would illustrate how to use the MxODBC Zope DA adaptor outside of a ZSQL method, using the Python API. I am using a script to build transact-sql statements, and it doesn't appear to be possible to pass t-sql into a ZSQL method. Any advice would be greatly appreciated. Thank you and Best Regards, Christopher A. Nethery-------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20070104/e41d4e9a/attachment.htm From charlie at egenix.com Mon Jan 8 12:09:38 2007 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 8 12:09:46 2007 Subject: [egenix-users] Basic tsql example using MxODBC Zope DA adaptor? In-Reply-To: <410-2200714416523693@earthlink.net> References: <410-2200714416523693@earthlink.net> Message-ID: Am 04.01.2007, 17:52 Uhr, schrieb gilcneth@earthlink.net : > Hello Everyone, > I am relatively new to Zope/Plone, as well as the MxODBC Zope DA > adaptor. I am wondering if someone could point me to a basic example > that would illustrate how to use the MxODBC Zope DA adaptor outside of a > ZSQL method, using the Python API. I am using a script to build > transact-sql statements, and it doesn't appear to be possible to pass > t-sql into a ZSQL method. > Any advice would be greatly appreciated. You can use the mxODBC ZopeDA to pass in all kinds of SQL, ie. if you wish to generate your SQL dynamically or to make use of bound parameters. This is done using an ExternalMethod as detailed below. However, this will still be within Zope's transacational management and is, thus, not suitable if you wish to manage transactions yourself. If you wish to do this then you should first of all read up on Zope's transactional management to see how to use this. If you wish to use this for something like a batch function then you are probably better of without using Zope at all. """ ZSQL and ZopeDAs are severely limited and contain antiquated code. This makes it particularly difficult to generate dynamic SQL as often required. It also means that parameters get quoted by the DA which can be messy. An alternative is to use ExternalMethods to call the .execute() method of an mxODBCZopeDA and pass it statements and parameters. Create a file in ~/Extensions, say ODBC_SQL.py This is essentially needs only one function: from Shared.DC.ZRDB import Results def callSQL(connObj, SQL="SELECT value FROM content"): results = connObj.execute(SQL) return Results.Results(results) Create a Zope External Method say SQL which points to callSQL in ODBC_SQL. You can then call this method from any PythonScript and simply pass it the connection and statement you want to execute. In your case the PythonScript needs only to be modified slightly, depending on what you want to. statement = "select [Building ID] from [Buildings] "\ "where [Building Name] = ?" results = context.SQL(mymxODBCZopeDA(), statement) return results The results returned are the same as would be returned by a ZSQL-method.""" Charlie From matt at nipltd.com Mon Jan 15 10:30:34 2007 From: matt at nipltd.com (Matt Hoskins) Date: Mon Jan 15 11:31:17 2007 Subject: [egenix-users] Any plans to release the version of "mxODBC" included in "mxODBC Zope DA" on its own? Message-ID: <1168857034.11868.9.camel@rhubarb> The standalone mxODBC package (not zope da version) doesn't seem to have been touched in a while and the "TODO" list shown for it has stayed the same for ages. As I've been aware that the "mxODBC Zope DA" package has been undergoing active development work out of curiosity I had a look inside the package and that seems to have a more recent version of the mxODBC package as part of it which does seem to have resolved some of the items that were on the "TODO" list (in particular it seems with the newer version included in the Zope DA it's now possible to look at all errors and warnings raised as a result of a single SQL statement execute, whereas in the current standalone version it isn't). So I'm wondering if egenix ever plans to release the more recent versions of the mxODBC package that are included in the Zope DA package as standalone mxODBC package versions, or is 2.0.7 likely to be the last standalone release for a while? Regards, Matt From charlie at egenix.com Mon Jan 15 11:34:18 2007 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 15 11:34:25 2007 Subject: [egenix-users] Any plans to release the version of "mxODBC" included in "mxODBC Zope DA" on its own? In-Reply-To: <1168857034.11868.9.camel@rhubarb> References: <1168857034.11868.9.camel@rhubarb> Message-ID: Am 15.01.2007, 11:30 Uhr, schrieb Matt Hoskins : > The standalone mxODBC package (not zope da version) doesn't seem to have > been touched in a while and the "TODO" list shown for it has stayed the > same for ages. As I've been aware that the "mxODBC Zope DA" package has > been undergoing active development work out of curiosity I had a look > inside the package and that seems to have a more recent version of the > mxODBC package as part of it which does seem to have resolved some of > the items that were on the "TODO" list (in particular it seems with the > newer version included in the Zope DA it's now possible to look at all > errors and warnings raised as a result of a single SQL statement > execute, whereas in the current standalone version it isn't). > So I'm wondering if egenix ever plans to release the more recent > versions of the mxODBC package that are included in the Zope DA package > as standalone mxODBC package versions, or is 2.0.7 likely to be the last > standalone release for a while? Dear Matt, we are indeed planning a new release of mxODBC to bring it up to date with mxODBC Zope DA. Charlie From nicogrubert at gmail.com Thu Jan 18 16:02:05 2007 From: nicogrubert at gmail.com (Nico Grubert) Date: Thu Jan 18 16:02:29 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error Message-ID: <45AF8BED.10708@gmail.com> Dear list members, From time to time I get this error: eGenix mxODBC Zope DA: WARNING: could not rollback the transaction - the data source does not support transactions; this may result in data inconsistencies ! A few seconds later, after I got this error, Zope shuts down automatically. I see this error in the shell if I have started my Zope using: /zope_instance/bin/runzope Is there a way to see a more detailed error message? The error results from calling a Zope "ZSQL method" that just makes a simple "SELECT .." SQL query so I am wondering why mxODBCZopeDA wants to make a rollback. My setup: + 64-Bit Suse Linux 10.1 Professional + mxODBCZopeDA 1.0.10 + Zope 2.9.6. + Python 2.4.3. + ODBC Source: Filemaker 8 Advanced Server on a Windows2003 Server + Easysoft ODBC-ODBC Bridge which connects my Linux machine to the Windows2003 Server Regards, Nico From mal at egenix.com Thu Jan 18 16:16:43 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jan 18 16:16:48 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45AF8BED.10708@gmail.com> References: <45AF8BED.10708@gmail.com> Message-ID: <45AF8F5B.6080103@egenix.com> On 2007-01-18 16:02, Nico Grubert wrote: > Dear list members, > > From time to time I get this error: > > eGenix mxODBC Zope DA: WARNING: > 1082132800/1082132800 at 0x2aaaac7a4a70> could not rollback the > transaction - the data source does not support transactions; this may > result in data inconsistencies ! > > A few seconds later, after I got this error, Zope shuts down automatically. > I see this error in the shell if I have started my Zope using: > /zope_instance/bin/runzope > > Is there a way to see a more detailed error message? > > The error results from calling a Zope "ZSQL method" that just makes a > simple "SELECT .." SQL query so I am wondering why mxODBCZopeDA wants to > make a rollback. > > My setup: > + 64-Bit Suse Linux 10.1 Professional > + mxODBCZopeDA 1.0.10 > + Zope 2.9.6. > + Python 2.4.3. > + ODBC Source: Filemaker 8 Advanced Server on a Windows2003 Server > + Easysoft ODBC-ODBC Bridge which connects my Linux machine to the > Windows2003 Server That's a strange error message since AFAIK Filemaker does support transactions. The fact that Zope shuts down may hint to a core dump in the ODBC driver you are using. Since the ODBC driver is loaded into the Zope process as shared library, a core dump will have the effect of shutting down Zope itself as a result. In order to get more detailed information, you'd have to turn on ODBC level logging in the ODBC manager you are using (probably unixODBC). In order to enable logging at the ODBC driver manager level, please follow these instructions: 1. edit the odbc.ini file that defines the data source you are using (usually /etc/odbc.ini or ~/.odbc.ini) 2. add two trace options to the data source in question: [MyDataSourceName] Trace = On TraceFile = /tmp/odbc.log ... 3. restart Python and run a query on the connection You should then see the /tmp/odbc.log file fill up with ODBC call trace messages. Error messages from the ODBC driver should also appear in this file. In some cases you also have to edit the file /etc/odbcinst.ini (or ~/.odbcinst.ini) and add a section: [ODBC] Trace = On TraceFile= /tmp/odbc.log -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 18 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nicogrubert at gmail.com Fri Jan 19 09:00:51 2007 From: nicogrubert at gmail.com (Nico Grubert) Date: Fri Jan 19 09:01:38 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45AF8F5B.6080103@egenix.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> Message-ID: <45B07AB3.405@gmail.com> > In order to enable logging at the ODBC driver manager level, > please follow these instructions: > > > 1. edit the odbc.ini file that defines the data source > you are using (usually /etc/odbc.ini or ~/.odbc.ini) > > 2. add two trace options to the data source in question: > > [MyDataSourceName] > Trace = On > TraceFile = /tmp/odbc.log > ... > > 3. restart Python and run a query on the connection > > You should then see the /tmp/odbc.log file fill up with > ODBC call trace messages. Error messages from the ODBC > driver should also appear in this file. > > In some cases you also have to edit the file > /etc/odbcinst.ini (or ~/.odbcinst.ini) and add a section: > > [ODBC] > Trace = On > TraceFile= /tmp/odbc.log Dear Marc-Andre, thank you for your fast reply. I use unixODBC and I changed /etc/odbc.ini and /etc/odbcinst.ini. according your instructions. I restarted my Zope Server but unfortunately there are is neither a /tmp/odbc.log file created nor are any messages written to this file after I have created it manually. Regards, Nico From mal at egenix.com Fri Jan 19 10:33:27 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Fri Jan 19 10:33:34 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45B07AB3.405@gmail.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> <45B07AB3.405@gmail.com> Message-ID: <45B09067.1030807@egenix.com> On 2007-01-19 09:00, Nico Grubert wrote: >> In order to enable logging at the ODBC driver manager level, >> please follow these instructions: >> >> >> 1. edit the odbc.ini file that defines the data source >> you are using (usually /etc/odbc.ini or ~/.odbc.ini) >> >> 2. add two trace options to the data source in question: >> >> [MyDataSourceName] >> Trace = On >> TraceFile = /tmp/odbc.log >> ... >> >> 3. restart Python and run a query on the connection >> >> You should then see the /tmp/odbc.log file fill up with >> ODBC call trace messages. Error messages from the ODBC >> driver should also appear in this file. >> >> In some cases you also have to edit the file >> /etc/odbcinst.ini (or ~/.odbcinst.ini) and add a section: >> >> [ODBC] >> Trace = On >> TraceFile= /tmp/odbc.log > > > Dear Marc-Andre, > > thank you for your fast reply. > I use unixODBC and I changed /etc/odbc.ini and /etc/odbcinst.ini. > according your instructions. I restarted my Zope Server but > unfortunately there are is neither a /tmp/odbc.log file created nor are > any messages written to this file after I have created it manually. In that case, it's possible that the odbc.ini and/or odbcinst.ini files are stored somewhere else on your system. EasySoft should be able to tell you where to look and how to enable tracing. This is what they have to say on their web-site: http://www.easysoft.com/products/data_access/odbc_odbc_bridge/manual/APPXtechref.html#540101 Looks much like my description... -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 19 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nicogrubert at gmail.com Fri Jan 19 13:06:12 2007 From: nicogrubert at gmail.com (Nico Grubert) Date: Fri Jan 19 13:06:28 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45B09067.1030807@egenix.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> <45B07AB3.405@gmail.com> <45B09067.1030807@egenix.com> Message-ID: <45B0B434.4090504@gmail.com> > In that case, it's possible that the odbc.ini and/or odbcinst.ini > files are stored somewhere else on your system. My fault: I forgot to set the file permissions to the user who owns the Zope process. From griffmcc at comcast.net Sun Jan 21 17:13:40 2007 From: griffmcc at comcast.net (Griff McClellan) Date: Mon Jan 22 02:13:41 2007 Subject: [egenix-users] Passing a value from stored procedure to python? Message-ID: <00a701c73dc2$8db15f70$6400a8c0@Win> Hello, I need to pass a value from a stored procedure or function to the calling python script. Nothing I have tried has worked. I am using mx.ODBC.Windows with Oracle 10g on Windows XP. Can someone show me how a value, say 66, can be passed from a stored procedure/function to a python variable? Thank you, Griff Here are the things I've tried and the problems I have encountered. Note that the variable "cur" is a cursor. 1. There is no way to get the value returned from a stored function into the python script. Here's an example of the problem: >>> cur.execute("declare n number; begin n := num_test_sf(); >>> dbms_output.put_line(n); end;") -1 where: CREATE FUNCTION "CRAIG"."NUM_TEST_SF" return number is begin return 66; end; The root of the problem appears to be that you can't execute an anonymous block. >>> cur.execute("declare n number; begin n := 66; end;") -1 2. There is no way for a stored procedure to return a result set. >>> cur.execute("call resultset_test_sp()") 1 >>> cur.fetchall() Traceback (most recent call last): File "", line 1, in ? mxODBC.ProgrammingError: missing result set where: CREATE PROCEDURE "CRAIG"."RESULTSET_TEST_SP" is n number := -1; begin select 66 into n from dual; end; 3. callproc() is not implemented. >>> cur.callproc("num_test_sf()") Traceback (most recent call last): File "", line 1, in ? AttributeError: callproc >>> cur.callproc Traceback (most recent call last): File "", line 1, in ? AttributeError: callproc >>> cur.execute -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20070121/b179d858/attachment.htm From nicogrubert at gmail.com Mon Jan 22 08:53:07 2007 From: nicogrubert at gmail.com (Nico Grubert) Date: Mon Jan 22 08:53:22 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45AF8F5B.6080103@egenix.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> Message-ID: <45B46D63.3070504@gmail.com> > That's a strange error message since AFAIK Filemaker does support > transactions. The fact that Zope shuts down may hint to a core dump > in the ODBC driver you are using. Since the ODBC driver is loaded > into the Zope process as shared library, a core dump will have > the effect of shutting down Zope itself as a result. > > In order to get more detailed information, you'd have to turn > on ODBC level logging in the ODBC manager you are using > (probably unixODBC). I turned on ODBC level logging in my ODBC manager (unixODBC) and there are a lot of messages written to the log file. Unfortunately, I cannot see any error messages in the log file related to the error message that Zope throws out when stutting down and restarting. Zope error message: ------------------- eGenix mxODBC Zope DA: WARNING: could not rollback the transaction - the data source does not support transactions; this may result in data inconsistencies ! Regards, Nico From charlie at egenix.com Mon Jan 22 10:17:59 2007 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 22 10:18:11 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45B46D63.3070504@gmail.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> <45B46D63.3070504@gmail.com> Message-ID: Am 22.01.2007, 08:53 Uhr, schrieb Nico Grubert : > I turned on ODBC level logging in my ODBC manager (unixODBC) and there > are a lot of messages written to the log file. Unfortunately, I cannot > see any error messages in the log file related to the error message that > Zope throws out when stutting down and restarting. > Zope error message: > ------------------- > eGenix mxODBC Zope DA: WARNING: > 1082132800/1082132800 at 0x2aaaac7a4a70> could not rollback the > transaction - the data source does not support transactions; this may > result in data inconsistencies ! Nico, this warning merely states the obvious and is totally unrelated to any crash. Charlie From charlie at egenix.com Mon Jan 22 10:34:56 2007 From: charlie at egenix.com (Charlie Clark) Date: Mon Jan 22 10:35:05 2007 Subject: [egenix-users] Passing a value from stored procedure to python? In-Reply-To: <00a701c73dc2$8db15f70$6400a8c0@Win> References: <00a701c73dc2$8db15f70$6400a8c0@Win> Message-ID: Am 22.01.2007, 02:13 Uhr, schrieb Griff McClellan : > Hello, > I need to pass a value from a stored procedure or function to the calling > python script. Nothing I have tried has worked. I am using > mx.ODBC.Windows > with Oracle 10g on Windows XP. > Can someone show me how a value, say 66, can be passed from a stored > procedure/function to a python variable? Griff, mxODBC doesn't support output parameters for stored procedures. For more information see section 2.3.6 of the documentation. Charlie From mal at egenix.com Mon Jan 22 11:07:33 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 22 11:07:37 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45B46D63.3070504@gmail.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> <45B46D63.3070504@gmail.com> Message-ID: <45B48CE5.9090705@egenix.com> On 2007-01-22 08:53, Nico Grubert wrote: >> That's a strange error message since AFAIK Filemaker does support >> transactions. The fact that Zope shuts down may hint to a core dump >> in the ODBC driver you are using. Since the ODBC driver is loaded >> into the Zope process as shared library, a core dump will have >> the effect of shutting down Zope itself as a result. >> >> In order to get more detailed information, you'd have to turn >> on ODBC level logging in the ODBC manager you are using >> (probably unixODBC). > > I turned on ODBC level logging in my ODBC manager (unixODBC) and there > are a lot of messages written to the log file. Unfortunately, I cannot > see any error messages in the log file related to the error message that > Zope throws out when stutting down and restarting. > > Zope error message: > ------------------- > eGenix mxODBC Zope DA: WARNING: > 1082132800/1082132800 at 0x2aaaac7a4a70> could not rollback the > transaction - the data source does not support transactions; this may > result in data inconsistencies ! If the ODBC driver causes a core-dump then it's likely you won't see anything special in the generated log files. The end of the log should however hint at the location of the core dump. Could you send us the file ? Perhaps we can see something hinting at the problem you are having. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 22 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From mal at egenix.com Mon Jan 22 11:12:08 2007 From: mal at egenix.com (M.-A. Lemburg) Date: Mon Jan 22 11:12:12 2007 Subject: [egenix-users] Passing a value from stored procedure to python? In-Reply-To: <00a701c73dc2$8db15f70$6400a8c0@Win> References: <00a701c73dc2$8db15f70$6400a8c0@Win> Message-ID: <45B48DF8.9040100@egenix.com> On 2007-01-22 02:13, Griff McClellan wrote: > Hello, > > I need to pass a value from a stored procedure or function to the calling > python script. Nothing I have tried has worked. I am using mx.ODBC.Windows > with Oracle 10g on Windows XP. > > Can someone show me how a value, say 66, can be passed from a stored > procedure/function to a python variable? You have to create a result using SELECT. mxODBC doesn't support output parameters from stored procedures, but it does support multiple result sets, so this is well possible, even if you have more than one output parameter that you wrap into result sets. Regards, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 22 2007) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From griffmcc at comcast.net Mon Jan 22 13:59:25 2007 From: griffmcc at comcast.net (Griff McClellan) Date: Mon Jan 22 22:59:28 2007 Subject: [egenix-users] Passing a value from stored procedure to python? References: <00a701c73dc2$8db15f70$6400a8c0@Win> <45B48DF8.9040100@egenix.com> Message-ID: <013501c73e70$95211120$6400a8c0@Win> Hello Mr. Lemburg, Thank you for the reply. I have been unable to return a result set from a stored procedure. I appreciate any suggestions. Here's a distillation of the problem. I can generate a result set by executing a select statement. For example, >>> cur.execute('select 66 from dual') >>> cur.fetchall() [(66.0,)] But if I create a stored procedure to generate the same result set, the procedure returns 1 and no result set. CREATE PROCEDURE "CRAIG"."RESULTSET_TEST_SP" is n number := -1; begin select 66 into n from dual; end; >>> cur.execute('call RESULTSET_TEST_SP()') 1 >>> cur.fetchall() Traceback (most recent call last): File "", line 1, in ? mxODBC.ProgrammingError: missing result set ----- Original Message ----- From: "M.-A. Lemburg" To: "Griff McClellan" Cc: Sent: Monday, January 22, 2007 2:12 AM Subject: Re: [egenix-users] Passing a value from stored procedure to python? > On 2007-01-22 02:13, Griff McClellan wrote: >> Hello, >> >> I need to pass a value from a stored procedure or function to the calling >> python script. Nothing I have tried has worked. I am using >> mx.ODBC.Windows >> with Oracle 10g on Windows XP. >> >> Can someone show me how a value, say 66, can be passed from a stored >> procedure/function to a python variable? > > You have to create a result using SELECT. mxODBC doesn't support > output parameters from stored procedures, but it does support > multiple result sets, so this is well possible, even if you have > more than one output parameter that you wrap into result sets. > > Regards, > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Jan 22 2007) >>>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > > ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: From nicogrubert at gmail.com Tue Jan 23 10:50:39 2007 From: nicogrubert at gmail.com (Nico Grubert) Date: Tue Jan 23 10:50:55 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> <45B46D63.3070504@gmail.com> Message-ID: <45B5DA6F.7020806@gmail.com> >> Zope error message: >> ------------------- >> eGenix mxODBC Zope DA: WARNING: >> > 1082132800/1082132800 at 0x2aaaac7a4a70> could not rollback the >> transaction - the data source does not support transactions; this may >> result in data inconsistencies ! > > > Nico, > > this warning merely states the obvious and is totally unrelated to any > crash. Thank you, Charlie. After I started Zope with /bin/runzope from the command line I saw in the command line that Zope shuts down with a "Segmentation fault". At the same time there is a log entry on my linux machine in /var/log/messages that reads: Jan 23 10:43:09 smut kernel: python[6231]: segfault at 00000000ffffffff rip 000000000043c0d7 rsp 00000000417f6ad0 error 4 This happens, if I make some SQL queries to the ODBC (~ 40 queries per minute). From support at egenix.com Tue Jan 23 12:15:38 2007 From: support at egenix.com (eGenix Support) Date: Tue Jan 23 12:15:56 2007 Subject: [egenix-users] Zope shutdown after "Could not rollback the transaction" error In-Reply-To: <45B5DA6F.7020806@gmail.com> References: <45AF8BED.10708@gmail.com> <45AF8F5B.6080103@egenix.com> <45B46D63.3070504@gmail.com> <45B5DA6F.7020806@gmail.com> Message-ID: Am 23.01.2007, 10:50 Uhr, schrieb Nico Grubert : > Thank you, Charlie. > After I started Zope with /bin/runzope from the command > line I saw in the command line that Zope shuts down with a > "Segmentation fault". > At the same time there is a log entry on my linux machine in > /var/log/messages that reads: > Jan 23 10:43:09 smut kernel: python[6231]: segfault at 00000000ffffffff > rip 000000000043c0d7 rsp 00000000417f6ad0 error 4 > This happens, if I make some SQL queries to the ODBC (~ 40 queries per > minute). Nico, the error is definitely coming from the ODBC-ODBC bridge. We suggest you contact Easysoft with this information. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free! From support at egenix.com Tue Jan 23 12:44:20 2007 From: support at egenix.com (eGenix Support) Date: Tue Jan 23 12:44:30 2007 Subject: [egenix-users] Passing a value from stored procedure to python? In-Reply-To: <013501c73e70$95211120$6400a8c0@Win> References: <00a701c73dc2$8db15f70$6400a8c0@Win> <45B48DF8.9040100@egenix.com> <013501c73e70$95211120$6400a8c0@Win> Message-ID: Am 22.01.2007, 22:59 Uhr, schrieb Griff McClellan : > Hello Mr. Lemburg, > Thank you for the reply. I have been unable to return a result set > from a stored procedure. I appreciate any suggestions. Dear Mr. McClellan, our documentation is quite clear on what is and is not possible with stored procedures. However, what is surprising is that .callproc() doesn't seem to be working for you at all. Can you please tell us which version of mxODBC you are using? Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free! From griffmcc at comcast.net Tue Jan 23 07:11:28 2007 From: griffmcc at comcast.net (Griff McClellan) Date: Tue Jan 23 16:11:33 2007 Subject: [egenix-users] Passing a value from stored procedure to python? References: <00a701c73dc2$8db15f70$6400a8c0@Win> <45B48DF8.9040100@egenix.com> <013501c73e70$95211120$6400a8c0@Win> Message-ID: <018301c73f00$c2374360$6400a8c0@Win> >From the output of test.py: Testing package mx.ODBC.Windows version: 2.0.5 compiled with Unicode support using Python version: 2.4 Thanks, Griff ----- Original Message ----- From: "eGenix Support" To: "Griff McClellan" ; Cc: Sent: Tuesday, January 23, 2007 3:44 AM Subject: Re: [egenix-users] Passing a value from stored procedure to python? > Am 22.01.2007, 22:59 Uhr, schrieb Griff McClellan : > >> Hello Mr. Lemburg, >> Thank you for the reply. I have been unable to return a result set >> from a stored procedure. I appreciate any suggestions. > > Dear Mr. McClellan, > > our documentation is quite clear on what is and is not possible with > stored procedures. However, what is surprising is that .callproc() doesn't > seem to be working for you at all. Can you please tell us which version of > mxODBC you are using? > > Charlie > > -- > Charlie Clark > eGenix.com > > Professional Python Services directly from the Source >>>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free! From support at egenix.com Tue Jan 23 22:47:50 2007 From: support at egenix.com (eGenix Support) Date: Tue Jan 23 22:48:11 2007 Subject: [egenix-support] Re: [egenix-users] Passing a value from stored procedure to python? In-Reply-To: <018301c73f00$c2374360$6400a8c0@Win> References: <00a701c73dc2$8db15f70$6400a8c0@Win> <45B48DF8.9040100@egenix.com> <013501c73e70$95211120$6400a8c0@Win> <018301c73f00$c2374360$6400a8c0@Win> Message-ID: Am 23.01.2007, 16:11 Uhr, schrieb Griff McClellan : > From the output of test.py: > Testing package mx.ODBC.Windows version: 2.0.5 > compiled with Unicode support > using Python version: 2.4 ah, mxODBC 2.0.5 does not support callproc(). I suggest you try using the mxODBC package in our mxODBC Zope DA as it is version 2.1 and supports callproc(). We are planning a new release of mxODBC for all platforms that supports some of the additions that we have made to the mxODBC Zope DA but in the meantime suggest that you try the newer version. Charlie -- Charlie Clark eGenix.com Professional Python Services directly from the Source >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ Try mxODBC.Zope.DA for Windows, Mac OS, Linux, Solaris, FreeBSD for free!