From: Martijn T. <m.t...@up...> - 2009-01-28 09:07:23
|
Hi, I've been experimenting with the Firebird ODBC driver in Database Workbench and try to use it, however, I get these error messages: Do a "select * from table order by pk_columns": [Microsoft][ODBC Driver Manager] Invalid argument value When using a different cursor type (code modified), I get: [Microsoft][ODBC Driver Manager] Fetch type out of range What is the cause for this? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Alexander P. <ale...@re...> - 2009-01-28 09:42:51
|
Martijn Tonies wrote: > Hi, > > I've been experimenting with the Firebird ODBC driver in > Database Workbench and try to use it, however, I get these > error messages: > > Do a "select * from table order by pk_columns": > > [Microsoft][ODBC Driver Manager] Invalid argument value > > When using a different cursor type (code modified), I get: > [Microsoft][ODBC Driver Manager] Fetch type out of range > > > What is the cause for this? What driver do you use? ODBC driver RC1 2.0.0.148? If it is reproduced on this driver I will look at what is the problem. Where I can download the version of Database Workbench such as yours? Regards, Alexander |
From: Martijn T. <m.t...@up...> - 2009-01-28 10:08:45
|
Hello Alexander, >> I've been experimenting with the Firebird ODBC driver in >> Database Workbench and try to use it, however, I get these >> error messages: >> >> Do a "select * from table order by pk_columns": >> >> [Microsoft][ODBC Driver Manager] Invalid argument value >> >> When using a different cursor type (code modified), I get: >> [Microsoft][ODBC Driver Manager] Fetch type out of range >> >> >> What is the cause for this? > What driver do you use? ODBC driver RC1 2.0.0.148? If it is reproduced > on this driver I will look at what is the problem. Yes, that's the version I'm using, sorry, should have mentioned that. > Where I can download the version of Database Workbench such as yours? www.upscene.com - download the trial if you like. Next, use the ADO/ODBC Explorer from the Tools menu. Hope this helps. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Alexander P. <ale...@re...> - 2009-01-28 12:26:50
|
Martijn Tonies wrote: > Hello Alexander, > > >>> I've been experimenting with the Firebird ODBC driver in >>> Database Workbench and try to use it, however, I get these >>> error messages: >>> >>> Do a "select * from table order by pk_columns": >>> >>> [Microsoft][ODBC Driver Manager] Invalid argument value >>> >>> When using a different cursor type (code modified), I get: >>> [Microsoft][ODBC Driver Manager] Fetch type out of range >>> >>> >>> What is the cause for this? >>> >> What driver do you use? ODBC driver RC1 2.0.0.148? If it is reproduced >> on this driver I will look at what is the problem. >> > Next, use the ADO/ODBC Explorer from the Tools menu. > > > I have found a very interesting thing, this program can not get data from different sources (I tried Oracle, MySQL, Firebird ODBC drivers) but for different reasons. Probably this ODBC tool is enough crude. I have looked at Firebird ODBC under debug but I have not seen any problems in the driver by operating through this program. The error "Fetch type out of range" is more interesting but I did not understand how I can modify cursor type. Please help me in this. Regards, Alexander |
From: Martijn T. <m.t...@up...> - 2009-01-28 12:31:47
|
Hello Alexander, >>>> I've been experimenting with the Firebird ODBC driver in >>>> Database Workbench and try to use it, however, I get these >>>> error messages: >>>> >>>> Do a "select * from table order by pk_columns": >>>> >>>> [Microsoft][ODBC Driver Manager] Invalid argument value >>>> >>>> When using a different cursor type (code modified), I get: >>>> [Microsoft][ODBC Driver Manager] Fetch type out of range >>>> >>>> >>>> What is the cause for this? >>>> >>> What driver do you use? ODBC driver RC1 2.0.0.148? If it is reproduced >>> on this driver I will look at what is the problem. >>> >> Next, use the ADO/ODBC Explorer from the Tools menu. >> >> >> > I have found a very interesting thing, this program can not get data > from different sources (I tried Oracle, MySQL, Firebird ODBC drivers) > but for different reasons. Hmm, I tried several others MS SQL, MS Access, Oracle (via MS driver) and they worked fine. Care to let me know the reasons? :-) > Probably this ODBC tool is enough crude. > I have looked at Firebird ODBC under debug but I have not seen any > problems in the driver by operating through this program. The error > "Fetch type out of range" is more interesting but I did not understand > how I can modify cursor type. Please help me in this. You cannot from the program itself, I modified the code for that. Didn't you get a " [Microsoft][ODBC Driver Manager] Invalid argument value " when trying? That's what I got at first before I modified the cursor type. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Alexander P. <ale...@re...> - 2009-01-28 14:39:25
|
Martijn Tonies wrote: > Hmm, I tried several others MS SQL, MS Access, Oracle (via MS driver) > and they worked fine. Care to let me know the reasons? :-) > > Oracle 11g Select * from table - [Oracle][ODBC]Invalid descriptor index <0>. MySQL 5 (mysql-connector-odbc-5.1.5-win32) Select * from table - [MySQL][ODBC 5.1 Driver][mysqld-5.1.30-community]Optional feature not implemented Firebird - [Microsoft][ODBC Driver Manager] Invalid argument value. Via ADO(OLE DB for ODBC) - no problems. By the way in IBExpert (Tools\ODBC Viewer) I do not have troubles too. > You cannot from the program itself, I modified the code for that. > > Didn't you get a " [Microsoft][ODBC Driver Manager] Invalid argument value " > when trying? That's what I got at first before I modified the cursor type. > What ODBC API function is failed? It is not a message of Firebird ODBC driver (but "Fetch type out of range" is a message of driver. By the way Firebird ODBC driver supports only FORWARD ONLY and STATIC cursors in full). Regards, Alexander |
From: Alexander P. <ale...@re...> - 2009-01-28 14:48:04
|
Alexander Potapchenko wrote: > What ODBC API function is failed? It is not a message of Firebird ODBC > driver (but "Fetch type out of range" is a message of driver. By the way > Firebird ODBC driver supports only FORWARD ONLY and STATIC cursors in full). > Sorry, I have found this... DBW3 830-820 ENTER SQLGetData HSTMT 03232190 UWORD 0 SWORD -2 <SQL_C_BINARY> PTR <unknown type> SQLLEN 0 SQLLEN * 0x0578FE68 DBW3 830-820 EXIT SQLGetData with return code -1 (SQL_ERROR) HSTMT 03232190 UWORD 0 SWORD -2 <SQL_C_BINARY> PTR <unknown type> SQLLEN 0 SQLLEN * 0x0578FE68 DIAG [HY009] [Microsoft][ODBC Driver Manager] Invalid argument value (0) Alexander |
From: Martijn T. <m.t...@up...> - 2009-01-28 14:52:57
|
Hello Alexander, > Alexander Potapchenko wrote: >> What ODBC API function is failed? It is not a message of Firebird ODBC >> driver (but "Fetch type out of range" is a message of driver. By the way >> Firebird ODBC driver supports only FORWARD ONLY and STATIC cursors in >> full). >> > Sorry, I have found this... > > > DBW3 830-820 ENTER SQLGetData > HSTMT 03232190 > UWORD 0 > SWORD -2 <SQL_C_BINARY> > PTR <unknown type> > SQLLEN 0 > SQLLEN * 0x0578FE68 > > DBW3 830-820 EXIT SQLGetData with return code -1 > (SQL_ERROR) > HSTMT 03232190 > UWORD 0 > SWORD -2 <SQL_C_BINARY> > PTR <unknown type> > SQLLEN 0 > SQLLEN * 0x0578FE68 > > DIAG [HY009] [Microsoft][ODBC Driver Manager] Invalid argument > value (0) In Delphi, I'm using the ODBCExpress components, what would raise this error? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Alexander P. <ale...@re...> - 2009-01-28 15:22:26
|
Martijn Tonies wrote: >> DBW3 830-820 ENTER SQLGetData >> HSTMT 03232190 >> UWORD 0 >> SWORD -2 <SQL_C_BINARY> >> PTR <unknown type> >> SQLLEN 0 >> SQLLEN * 0x0578FE68 >> >> DBW3 830-820 EXIT SQLGetData with return code -1 >> (SQL_ERROR) >> HSTMT 03232190 >> UWORD 0 >> SWORD -2 <SQL_C_BINARY> >> PTR <unknown type> >> SQLLEN 0 >> SQLLEN * 0x0578FE68 >> >> DIAG [HY009] [Microsoft][ODBC Driver Manager] Invalid argument >> value (0) >> > > In Delphi, I'm using the ODBCExpress components, what would raise > this error? > It is not a driver of RDBMS. The call stack at the level of the Firebird ODBC driver: Preparing statement: select ID_PRECE from "PRECES" order by "ID_PRECE" SQLFreeStmt SQLExecute SQLSetStmtAttrW SQL_ATTR_ROWS_FETCHED_PTR = 65213480 : 03E31428 SQLNumResultCols SQLDescribeColW Column 01 ID_PRECE has type 004, scale 000, precision 010 SQLColAttributeW SQLBindCol SQLColAttributeW SQLSetStmtAttrW SQLFetch SQLSetPos The next step is a call of SQLGetData function, but there are problems (maybe wrong parameters, null pointers) at a upward level (maybe ODBC driver manager). It is similar to problems in access components(ODBCExpress). You can try another components for a work with ODBC (AnyDac free edition, http://da-soft.com for example) too. Alexander |
From: Martijn T. <m.t...@up...> - 2009-01-28 18:23:24
|
----- Original Message ----- From: "Alexander Potapchenko" <ale...@re...> To: <fir...@li...> Sent: Wednesday, January 28, 2009 4:23 PM Subject: Re: [Firebird-odbc-devel] Driver issues > Martijn Tonies wrote: >>> DBW3 830-820 ENTER SQLGetData >>> HSTMT 03232190 >>> UWORD 0 >>> SWORD -2 <SQL_C_BINARY> >>> PTR <unknown type> >>> SQLLEN 0 >>> SQLLEN * 0x0578FE68 >>> >>> DBW3 830-820 EXIT SQLGetData with return code -1 >>> (SQL_ERROR) >>> HSTMT 03232190 >>> UWORD 0 >>> SWORD -2 <SQL_C_BINARY> >>> PTR <unknown type> >>> SQLLEN 0 >>> SQLLEN * 0x0578FE68 >>> >>> DIAG [HY009] [Microsoft][ODBC Driver Manager] Invalid argument >>> value (0) >>> >> >> In Delphi, I'm using the ODBCExpress components, what would raise >> this error? >> > It is not a driver of RDBMS. > The call stack at the level of the Firebird ODBC driver: > Preparing statement: > select > ID_PRECE > from > "PRECES" > order by > "ID_PRECE" > SQLFreeStmt > SQLExecute > SQLSetStmtAttrW > SQL_ATTR_ROWS_FETCHED_PTR = 65213480 : 03E31428 > SQLNumResultCols > SQLDescribeColW > Column 01 ID_PRECE has type 004, scale 000, > precision 010 > SQLColAttributeW > SQLBindCol > SQLColAttributeW > SQLSetStmtAttrW > SQLFetch > SQLSetPos > > The next step is a call of SQLGetData function, but there are problems > (maybe wrong parameters, null pointers) at a upward level (maybe ODBC > driver manager). > It is similar to problems in access components(ODBCExpress). You can try > another components for a work with ODBC (AnyDac free edition, > http://da-soft.com for example) too. Replacing the componentset is not an option. Exactly this code works for other ODBC drivers (although not all, as you have shown). I can detect features/ODBC driver functionality though, so if you can figure out what's wrong, I can try and work around it. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Martijn T. <m.t...@up...> - 2009-02-11 14:14:07
|
Hi Alexander, > Alexander Potapchenko wrote: >> What ODBC API function is failed? It is not a message of Firebird ODBC >> driver (but "Fetch type out of range" is a message of driver. By the way >> Firebird ODBC driver supports only FORWARD ONLY and STATIC cursors in >> full). >> > Sorry, I have found this... > > > DBW3 830-820 ENTER SQLGetData > HSTMT 03232190 > UWORD 0 > SWORD -2 <SQL_C_BINARY> > PTR <unknown type> > SQLLEN 0 > SQLLEN * 0x0578FE68 > > DBW3 830-820 EXIT SQLGetData with return code -1 > (SQL_ERROR) > HSTMT 03232190 > UWORD 0 > SWORD -2 <SQL_C_BINARY> > PTR <unknown type> > SQLLEN 0 > SQLLEN * 0x0578FE68 > > DIAG [HY009] [Microsoft][ODBC Driver Manager] Invalid argument > value (0) I noticed HY009 could signal "invalid use of null pointer", is that correct? >What ODBC API function is failed? It is not a message of Firebird ODBC >driver (but "Fetch type out of range" is a message of driver. By the way >Firebird ODBC driver supports only FORWARD ONLY and STATIC cursors in >full). What causes "fetch type out of range"? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Alexander P. <ale...@re...> - 2009-02-12 10:08:18
|
Martijn Tonies wrote: > I noticed HY009 could signal "invalid use of null pointer", is that > correct? Generally HY009 is an invalid argument value with usage a null pointer. >> What ODBC API function is failed? It is not a message of Firebird ODBC >> driver (but "Fetch type out of range" is a message of driver. By the way >> Firebird ODBC driver supports only FORWARD ONLY and STATIC cursors in >> full). >> > > What causes "fetch type out of range"? > In SQLFetchScroll or SQLExtendedFetch, the wrong usage of an operation type: if( cursorType == SQL_CURSOR_FORWARD_ONLY && orientation != SQL_FETCH_NEXT ) return sqlReturn (SQL_ERROR, "HY106", "Fetch type out of range"); Regards, Alexander |
From: Martijn T. <m.t...@up...> - 2009-02-18 14:13:52
|
Hello Alexander, I've tried a different componentset and it browses data just fine in Delphi. However, I ran into a new problem -- I have this table with BLOBs, I put down an odbc query component in Delphi and set "UniDirectional" to True. When I want to activate the query component, it calls SQLExecute and then doesn't return for quite a while. Meanwhile, the memory usage of the application goes -way up- ... and it ends with an Access Violation error. Is the driver fetching all rows despite the component not doing that? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: bill l. <cbi...@gm...> - 2009-02-18 14:39:32
|
On Wed, 18 Feb 2009, Martijn Tonies wrote: > When I want to activate the query component, it calls > SQLExecute and then doesn't return for quite a while. > Meanwhile, the memory usage of the application goes > -way up- ... and it ends with an Access Violation error. > > Is the driver fetching all rows despite the component > not doing that? Did you set a smaller buffer for sqlgetdata and retrieve blob data block after block? AFAICS you cannot bind a blob field using its declared size (2GB or more?). -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩169 僧皎然 尋陸鴻漸不遇 移家雖帶郭 野徑入桑麻 近種籬邊菊 秋來未著花 扣門無犬吠 欲去問西家 報到山中去 歸來每日斜 |
From: Alexander P. <ale...@re...> - 2009-02-18 19:01:43
|
Martijn Tonies wrote: > Hello Alexander, > > > I've tried a different componentset and it browses data just > fine in Delphi. > > However, I ran into a new problem -- > > I have this table with BLOBs, I put down an odbc query > component in Delphi and set "UniDirectional" to True. > > When I want to activate the query component, it calls > SQLExecute and then doesn't return for quite a while. > Meanwhile, the memory usage of the application goes > -way up- ... and it ends with an Access Violation error. > > Is the driver fetching all rows despite the component > not doing that? > > > Hello Martijn! What components do you use? I think you need the Cursor type = ForwardOnly (else the driver fetching all rows) . Regards, Alexander |
From: Martijn T. <m.t...@up...> - 2009-02-19 07:45:07
|
Hello Alexander, >> I've tried a different componentset and it browses data just >> fine in Delphi. >> >> However, I ran into a new problem -- >> >> I have this table with BLOBs, I put down an odbc query >> component in Delphi and set "UniDirectional" to True. >> >> When I want to activate the query component, it calls >> SQLExecute and then doesn't return for quite a while. >> Meanwhile, the memory usage of the application goes >> -way up- ... and it ends with an Access Violation error. >> >> Is the driver fetching all rows despite the component >> not doing that? >> >> >> > Hello Martijn! > What components do you use? The ones from SoftVector. > I think you need the Cursor type = ForwardOnly (else the driver > fetching all rows) . It seems the components always used a static cursor. I've modified the components to use a ForwardOnly cursor: if FUniDirectional then CheckError(SQLSetStmtAttr(FStmtHandle, SQL_ATTR_CURSOR_TYPE, Pointer(SQL_CURSOR_FORWARD_ONLY), SQL_IS_UINTEGER)) // set static cursor to avoid problems with blobs else CheckError(SQLSetStmtAttr(FStmtHandle, SQL_ATTR_CURSOR_TYPE, Pointer(SQL_CURSOR_STATIC), SQL_IS_UINTEGER)); It returns from SQLExecute instantly now, so that's good. But when going through all rows, it still takes a lot of memory, as if all blobs are instantiated in memory. What could cause this? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Alexander P. <ale...@re...> - 2009-02-19 18:38:22
|
Martijn Tonies wrote: > It returns from SQLExecute instantly now, so that's good. > > But when going through all rows, it still takes a lot of memory, as > if all blobs are instantiated in memory. What could cause this? > > It seems that the client application caches the data. If the cursor type is FORWARD ONLY the driver should not caches the prior records. Regards, Alexander |
From: Martijn T. <m.t...@up...> - 2009-03-02 08:28:33
|
Hello Alexander, >> It returns from SQLExecute instantly now, so that's good. >> >> But when going through all rows, it still takes a lot of memory, as >> if all blobs are instantiated in memory. What could cause this? >> >> > It seems that the client application caches the data. If the cursor type > is FORWARD ONLY the driver should not caches the prior records. I've changed the call so that the components use an ODBC cursor type of FORWARD ONLY, yet, I can still see the memory use increase when working with blobs and cycling the resultset. I've forwarded this issue to the component creators too, perhaps you can check as well? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: Martijn T. <m.t...@up...> - 2009-02-18 14:44:15
|
Hello Bill, > On Wed, 18 Feb 2009, Martijn Tonies wrote: >> When I want to activate the query component, it calls >> SQLExecute and then doesn't return for quite a while. >> Meanwhile, the memory usage of the application goes >> -way up- ... and it ends with an Access Violation error. >> >> Is the driver fetching all rows despite the component >> not doing that? > > Did you set a smaller buffer for sqlgetdata and retrieve blob data > block after block? AFAICS you cannot bind a blob field using its > declared size (2GB or more?). I'm not retrieving anything yet - As far as I can see, it's the call to SQLExecute that stalls. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! Database questions? Check the forum: http://www.databasedevelopmentforum.com |
From: bill l. <cbi...@gm...> - 2009-02-18 14:55:16
|
On Wed, 18 Feb 2009, Martijn Tonies wrote: > I'm not retrieving anything yet - > > As far as I can see, it's the call to SQLExecute that stalls. If it column bind a blob field, memory buffer is allocated on local machine before sqlgetdata. May be you can do odbc trace for diagnosis. Good luck :-) -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩286 張祜 題金陵渡 金陵津渡小山樓 一宿行人自可愁 潮落夜江斜月裡 兩三星火是瓜州 |