Invalid Cursor state error
Hello, I am having a problem with my Zope/ Mysql system and was hoping that some kind soul in Zope land may be able to help me. I am running Zope 2.3.0 (Binary release, python 1.5.2 win 32-x86) MySQL using ZODBC to communicate with Zope. I am using a Win 98 SE box for development and NT 4 server when it is complete. The error I am receiving is: Error Type: sql.error Error Value: ('24000',0,'[Microsoft][ODBC Driver Manager] Invalid cursor state') I receive this error after 3 queries to the database. The type of queries makes no difference. I am not using cursors in my database. The ODBC trace logs give the following errors: <...snip...> z2 fffc4b8b-fffc2717 ENTER SQLExecDirect HSTMT 015E26F0 UCHAR * 0x012EEE74 [ 22] "select * from u_server" SDWORD 22 z2 fffc4b8b-fffc2717 EXIT SQLExecDirect with return code -1 (SQL_ERROR) HSTMT 015E26F0 UCHAR * 0x012EEE74 [ 22] "select * from u_server" SDWORD 22 DIAG [24000] [Microsoft][ODBC Driver Manager] Invalid cursor state (0) z2 fffc4b8b-fffc2717 ENTER SQLErrorW HENV 016DFC40 HDBC 00000000 HSTMT 015E26F0 WCHAR * 0x01E5F374 (NYI) SDWORD * 0x01E5F3B0 WCHAR * 0x01E5EF74 SWORD 511 SWORD * 0x01E5F3AE z2 fffc4b8b-fffc2717 EXIT SQLErrorW with return code 0 (SQL_SUCCESS) HENV 016DFC40 HDBC 00000000 HSTMT 015E26F0 WCHAR * 0x01E5F374 (NYI) SDWORD * 0x01E5F3B0 (0) WCHAR * 0x01E5EF74 [ 53] "[Microsoft][ODBC Driver Ma" SWORD 511 SWORD * 0x01E5F3AE (53) <...snip...> Any suggestions? I have tried to use the MySQL database method but could not install it correctly. Thanks -Matt
This is a ODBC specific problem related to SQL. Ive looked into cursor and get more confused the more I learn. If you can try and simplify your query. If all else fails try the perlDBI or mxODBC as alternatives... -- Andy McKay ----- Original Message ----- From: "matt standish" <mps_@hotmail.com> To: <zope@zope.org> Sent: Tuesday, April 03, 2001 2:16 PM Subject: [Zope] Invalid Cursor state error
Hello, I am having a problem with my Zope/ Mysql system and was hoping that some kind soul in Zope land may be able to help me. I am running Zope 2.3.0 (Binary release, python 1.5.2 win 32-x86) MySQL using ZODBC to communicate with Zope. I am using a Win 98 SE box for development and NT 4 server when it is complete. The error I am receiving is:
Error Type: sql.error Error Value: ('24000',0,'[Microsoft][ODBC Driver Manager] Invalid cursor state')
I receive this error after 3 queries to the database. The type of queries makes no difference. I am not using cursors in my database. The ODBC trace logs give the following errors:
<...snip...> z2 fffc4b8b-fffc2717 ENTER SQLExecDirect HSTMT 015E26F0 UCHAR * 0x012EEE74 [ 22] "select * from u_server" SDWORD 22
z2 fffc4b8b-fffc2717 EXIT SQLExecDirect with return code -1 (SQL_ERROR) HSTMT 015E26F0 UCHAR * 0x012EEE74 [ 22] "select * from u_server" SDWORD 22 DIAG [24000] [Microsoft][ODBC Driver Manager] Invalid cursor state (0)
z2 fffc4b8b-fffc2717 ENTER SQLErrorW HENV 016DFC40 HDBC 00000000 HSTMT 015E26F0 WCHAR * 0x01E5F374 (NYI) SDWORD * 0x01E5F3B0 WCHAR * 0x01E5EF74 SWORD 511 SWORD * 0x01E5F3AE
z2 fffc4b8b-fffc2717 EXIT SQLErrorW with return code 0 (SQL_SUCCESS) HENV 016DFC40 HDBC 00000000 HSTMT 015E26F0 WCHAR * 0x01E5F374 (NYI) SDWORD * 0x01E5F3B0 (0) WCHAR * 0x01E5EF74 [ 53] "[Microsoft][ODBC Driver Ma" SWORD 511 SWORD * 0x01E5F3AE (53)
<...snip...>
Any suggestions? I have tried to use the MySQL database method but could not install it correctly. Thanks -Matt
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Zopista said -
This is a ODBC specific problem related to SQL. Ive looked into cursor and get more confused the more I learn. If you can try and simplify your query. If all else fails try the perlDBI or mxODBC as alternatives...
I suggest you find a way to verify that the odbc data source works (outside zope). One way is to get mxOdbc working in Python. It may be that mySQL has enough tools to do this, I don't know. Alternatively, use ODBC to create some other kind of database. If you have an Access ODBC driver you can create an Access database. Create a table, then try to connect to it from zope using the ZODBC product. Anyway, it's important to be able to verify the the ODBC data source works, if you are going to keep using ODBC and are still having trouble. I don't have mySQL isntalled now, but I did last month and the ODBC driver worked OK. Cheers, Tom P
participants (3)
-
matt standish -
Thomas B. Passin -
Zopista