SQLSetStmtOption(..., SQL_CONCURRENCY, SQL_CONCUR_READ_ONLY) should be allowed #2910
Date: 2011-10-23 16:43:29 +0200
Last updated: 2012-01-26 15:32:08 +0100
Date: 2011-10-23 16:43:29 +0200
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
I have installed latest (as of 23.10.2011) server and client version of MonetDB on WIndows XP (also tried on Windows server 2003).
I try to retrieve data from MonetDB database - voc schema (that was created using "getting started guide"), using various SQLs:
All of these queries work, if I run them via MonetDB client. However, if I use a tool that connects via ODBC, then I always get generic error: ODBC error state: HYC00 code: 0 message: [MonetDB][ODBC Driver 11.5.3]Optional feature not implemented. Extended fetch failed.
I've tried 2 different tools and both say the same [MoneDB ... ] error - seems that tools parse this and give different errors regarding what exactly fails.
I must note, though, that ODBC does not fail completely. I managed to reverse engineer (fetch list of tables and table columns), which means that connection via ODBC has been successful to MonetDB using credentials I've entered.
Steps to Reproduce:
error: ... HYC00 code: 0 message: [MonetDB][ODBC Driver 11.5.3] ...
I'd expect to receive numeric output in the given example from the query.
Date: 2011-10-24 14:52:15 +0200
Fetching data works fine for me, so there must be something else going on.
Can you please create a log (see below) and attach it to this bug report.
To create a log, you need to start the application that uses the MonetDB ODBC driver with an extra environment variable. Probably the easiest way to do that is to start a cmd window (Start -> Run... -> cmd.exe) and in that window type
and then start your application from this window.
Instead of attaching, you can also send the file directly to me.
Date: 2011-10-24 17:32:43 +0200
Created attachment 82
In the log you will see 2 activities I performed via Oracle Business Intelligence - Administrator tool. First activity was to get rowcount (select count(*)...) and the other was to retrieve data.
Date: 2011-10-24 21:37:14 +0200
I analyzed the log (thanks, they're really helpful) and saw that the problem is with the call SQLSetStmtOption(hdl, SQL_CONCURRENCY, SQL_CONCUR_READ_ONLY). Three times the application tries this call, and since this option is not implemented, the driver returns an error "Optional feature not implemented". In all three cases the application then immediately closes the connection.
I'm just reading up on the option. The application is just telling the driver that the cursors are going to be used read-only. Since that is not a problem (read-write cursors are not supported, read-only cursors shouldn't pose any problem), this is an option we can support. I will fix that for the next release. (It's too late for the Aug2011-SP2 release which is undergoing final testing.)
I'm changing the summary.
Date: 2011-10-24 21:46:21 +0200
For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=942ca37cb3e3
Date: 2011-10-24 22:05:20 +0200
Created attachment 83
I attach another ODBC log file - just in case, you find it useful.. I have made 4 differenct calls from SAP Business Objects designer: 1) two calls via ODBC 2.x driver trying to retrieve select count() ... and select * ....;. 2) two calls via ODBC 3.x driver trying to retrieve select count () ... and select * from ... .
Date: 2011-10-25 16:04:01 +0200
(In reply to comment 5)
The errors in this log are all
I will change the driver to provide the error message from the server to the application (instead of the generic message) with the same error code.
Date: 2011-12-14 16:53:19 +0100
I'm closing this report. A number of issues with the ODBC driver have been fixed recently in the upcoming (Dec2011) release that had to do with the problem described in the description and first few comments. I have tested the driver against the Oracle Business Intelligence tool (both online and offline) and the driver and server now seem to be working.
Date: 2012-01-26 15:32:08 +0100
The Dec2011 version has been release, so declaring this bug as FIXED.
The text was updated successfully, but these errors were encountered: