Discussion:
[Firebird-odbc-devel] SQLGetData and bookmarks while using OpenOffice.org
Ocke Janssen
2011-01-27 07:58:33 UTC
Permalink
Hi,

My name is Ocke Janssen, I'm the project lead of the dba.openoffice.org
project and I got a problem ;-)

While trying to fetch bookmarks I crash inside the newest ODBC version
of Firebird.


KernelBase.dll!74edb727()
[Frames below may be incorrect and/or missing, no symbols loaded
for KernelBase.dll]
KernelBase.dll!74edb727()
OdbcFb.dll!_CxxThrowException(void * pExceptionObject=0x00cfbfe4,
const _s__ThrowInfo * pThrowInfo=0x0df9f060) Line 161 C++
OdbcFb.dll!IscDbcLibrary::Sqlda::getSqlTypeName() + 0x23b bytes
C++
OdbcFb.dll!IscDbcLibrary::Sqlda::getColumnTypeName() + 0x2b bytes
C++
OdbcFb.dll!IscDbcLibrary::IscStatementMetaData::getSqlTypeName()
+ 0x16 bytes C++
OdbcFb.dll!OdbcJdbcLibrary::OdbcDesc::defFromMetaDataOut() + 0xd5
bytes C++
OdbcFb.dll!OdbcJdbcLibrary::OdbcStatement::prepareGetData() +
0x3a bytes C++
OdbcFb.dll!OdbcJdbcLibrary::OdbcStatement::sqlGetData() + 0x1e3
bytes C++
OdbcFb.dll!***@24() + 0x60 bytes C++
odbc32.dll!5899b7bf()
odbcbasemi.dll!connectivity::odbc::OTools::getBytesValue(connectivity::odbc::OConnection
* _pConnection=0x09978674, void * _aStatementHandle=0x011125b0, long
columnIndex=0, short _fSqlType=-2, unsigned char & _bWasNull='', const
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &
_xInterface={...}) Line 494 + 0x3a bytes C++

odbcbasemi.dll!connectivity::odbc::OResultSet::move(connectivity::IResultSetHelper::Movement
_eCursorPosition=FIRST, long _nOffset=0, unsigned char __formal='')
Line 1657 + 0x6e bytes C++

The SQL_ATTR_USE_BOOKMARKS is VARIABLE (2) and the type which I use for
SQLGetaData is -2(SQL_C_VARBOOKMARK)

Do you have any hint what I'm doing wrong?

Best regards,

Ocke Janssen
--
<http://www.oracle.com/>
Ocke Janssen | Software Developer
Phone: +40 23646500
OracleOffice

ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

<http://www.oracle.com/commitment>



Oracle is committed to developing practices and products that help
protect the environment
Alexander Potapchenko
2011-01-27 09:11:25 UTC
Permalink
Post by Ocke Janssen
Hi,
My name is Ocke Janssen, I'm the project lead of the dba.openoffice.org
project and I got a problem ;-)
While trying to fetch bookmarks I crash inside the newest ODBC version
of Firebird.
KernelBase.dll!74edb727()
[Frames below may be incorrect and/or missing, no symbols loaded
for KernelBase.dll]
KernelBase.dll!74edb727()
OdbcFb.dll!_CxxThrowException(void * pExceptionObject=0x00cfbfe4,
const _s__ThrowInfo * pThrowInfo=0x0df9f060) Line 161 C++
OdbcFb.dll!IscDbcLibrary::Sqlda::getSqlTypeName() + 0x23b bytes
C++
OdbcFb.dll!IscDbcLibrary::Sqlda::getColumnTypeName() + 0x2b bytes
C++
OdbcFb.dll!IscDbcLibrary::IscStatementMetaData::getSqlTypeName()
+ 0x16 bytes C++
OdbcFb.dll!OdbcJdbcLibrary::OdbcDesc::defFromMetaDataOut() + 0xd5
bytes C++
OdbcFb.dll!OdbcJdbcLibrary::OdbcStatement::prepareGetData() +
0x3a bytes C++
OdbcFb.dll!OdbcJdbcLibrary::OdbcStatement::sqlGetData() + 0x1e3
bytes C++
odbc32.dll!5899b7bf()
odbcbasemi.dll!connectivity::odbc::OTools::getBytesValue(connectivity::odbc::OConnection
* _pConnection=0x09978674, void * _aStatementHandle=0x011125b0, long
columnIndex=0, short _fSqlType=-2, unsigned char& _bWasNull='', const
com::sun::star::uno::Reference<com::sun::star::uno::XInterface> &
_xInterface={...}) Line 494 + 0x3a bytes C++
odbcbasemi.dll!connectivity::odbc::OResultSet::move(connectivity::IResultSetHelper::Movement
_eCursorPosition=FIRST, long _nOffset=0, unsigned char __formal='')
Line 1657 + 0x6e bytes C++
The SQL_ATTR_USE_BOOKMARKS is VARIABLE (2) and the type which I use for
SQLGetaData is -2(SQL_C_VARBOOKMARK)
Do you have any hint what I'm doing wrong?
Best regards,
Ocke Janssen
Hi Ocke,

Do you use Firebird ODBC driver 2.0.0.150 RC2 32-bit?
Do you have any idea how I can reproduce your problem quickly (via
openoffice or C++ example)?
I have tried to reproduce the problem with IBExpert/ODBC Viewer (it uses
SQLFetchScroll/SQLGetData), but it works fine.


Regards,
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Ocke Janssen
2011-01-27 10:44:43 UTC
Permalink
Hi Alexander,
Post by Alexander Potapchenko
Hi Ocke,
Do you use Firebird ODBC driver 2.0.0.150 RC2 32-bit?
Do you have any idea how I can reproduce your problem quickly (via
openoffice or C++ example)?
I have tried to reproduce the problem with IBExpert/ODBC Viewer (it uses
SQLFetchScroll/SQLGetData), but it works fine.
I upload a debug version for Windows on
ftp://qa-upload.services.openoffice.org/dba34d/OOo_DEV300m96_Win_x86_install-arc_en-US.zip

You have to start sbase.exe and choose ODBC in the lowest listbox.
- Choose your db and press finish and store the odb file somewhere
- The tables folder will automatically selected
- But there are no tables (may a config problem on my side, I used
odbctest from MS and call SQLTables results only in 3 system tables and
nothing more) :-(
- Go to the queries and create one ( select the "Create Query in SQL View"
- Enter a simple "select * from your_table_name"
- Run it
=> Crash

I'm using 2.0.0.150 RC2 64-bit.

- oj
Post by Alexander Potapchenko
Regards,
Alexander
Alexander Potapchenko
2011-01-27 11:55:31 UTC
Permalink
Post by Ocke Janssen
Hi Alexander,
I upload a debug version for Windows on
ftp://qa-upload.services.openoffice.org/dba34d/OOo_DEV300m96_Win_x86_install-arc_en-US.zip
You have to start sbase.exe and choose ODBC in the lowest listbox.
- Choose your db and press finish and store the odb file somewhere
- The tables folder will automatically selected
- But there are no tables (may a config problem on my side, I used
odbctest from MS and call SQLTables results only in 3 system tables and
nothing more) :-(
You must use usr/pwd - SYSDBA/masterkey in DSN settings. The trusted
authentication is fixed for 2.0 release.
Post by Ocke Janssen
- Go to the queries and create one ( select the "Create Query in SQL View"
- Enter a simple "select * from your_table_name"
- Run it
=> Crash
I have tried to execute select * from EMPLOYEE (upper case) and it works
fine with Firebird 2.5 and SQL dialect 3.
The query - select * from employee returns SQL_ERROR (TABLE unknow)
because your application generates query - select * from "employee" - it
is wrong for Firebird server with dialect 3.
You can use select * from "EMPLOYEE" - but this question for Firebird
server developers.
I don't see crash. I do something wrong?
Post by Ocke Janssen
I'm using 2.0.0.150 RC2 64-bit.
- oj
Your application is 32-bit and it uses 32-bit driver properly, 64-bit
windows installer of the Firebird ODBC driver installs 32-bit and 64-bit
drivers.


Regards,
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Ocke Janssen
2011-01-27 12:27:41 UTC
Permalink
Post by Alexander Potapchenko
Post by Ocke Janssen
Hi Alexander,
I upload a debug version for Windows on
ftp://qa-upload.services.openoffice.org/dba34d/OOo_DEV300m96_Win_x86_install-arc_en-US.zip
You have to start sbase.exe and choose ODBC in the lowest listbox.
- Choose your db and press finish and store the odb file somewhere
- The tables folder will automatically selected
- But there are no tables (may a config problem on my side, I used
odbctest from MS and call SQLTables results only in 3 system tables and
nothing more) :-(
You must use usr/pwd - SYSDBA/masterkey in DSN settings. The trusted
authentication is fixed for 2.0 release.
Post by Ocke Janssen
- Go to the queries and create one ( select the "Create Query in SQL View"
- Enter a simple "select * from your_table_name"
- Run it
=> Crash
I have tried to execute select * from EMPLOYEE (upper case) and it works
fine with Firebird 2.5 and SQL dialect 3.
The query - select * from employee returns SQL_ERROR (TABLE unknow)
because your application generates query - select * from "employee" - it
is wrong for Firebird server with dialect 3.
You can use select * from "EMPLOYEE" - but this question for Firebird
server developers.
I don't see crash. I do something wrong?
I found the difference. Since I log in sysdba I see the tables I created.

While in Office go to the menu Edit->Database->AdvancedSettings
in the dialog select the 2nd page and check the last entry ("Ignore the
result set type" the text is wrong it should be respect and not ignore:-)
Save/Close file and reopen it.
Double click on the table => crash.

- oj
Post by Alexander Potapchenko
Post by Ocke Janssen
I'm using 2.0.0.150 RC2 64-bit.
- oj
Your application is 32-bit and it uses 32-bit driver properly, 64-bit
windows installer of the Firebird ODBC driver installs 32-bit and 64-bit
drivers.
Regards,
Alexander
Alexander Potapchenko
2011-01-27 13:48:10 UTC
Permalink
Post by Ocke Janssen
I found the difference. Since I log in sysdba I see the tables I created.
While in Office go to the menu Edit->Database->AdvancedSettings
in the dialog select the 2nd page and check the last entry ("Ignore the
result set type" the text is wrong it should be respect and not ignore:-)
Save/Close file and reopen it.
Double click on the table => crash.
Reproduced. It is SQLGetData bug with column number 0 (if bookmarks are
enabled).
The Firebird bug tracker is not available now -
http://tracker.firebirdsql.org/secure/Dashboard.jspa and I will create
issue when this problem will be solved.


Regards
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Alexander Potapchenko
2011-01-28 09:29:51 UTC
Permalink
Post by Alexander Potapchenko
Reproduced. It is SQLGetData bug with column number 0 (if bookmarks
are enabled).
The Firebird bug tracker is not available now -
http://tracker.firebirdsql.org/secure/Dashboard.jspa and I will create
issue when this problem will be solved.
Regards
Alexander
Hi Ocke,

I have created the issue -
http://tracker.firebirdsql.org/browse/ODBC-106 and I have attached the
fixed driver for your testing there.


Regards,
Alexander
--
Alexander Potapchenko
Lead developer
LASP technology, http://www.lasptech.ru
Ocke Janssen
2011-01-28 09:44:34 UTC
Permalink
Hi Alexander,
Post by Alexander Potapchenko
Post by Alexander Potapchenko
Reproduced. It is SQLGetData bug with column number 0 (if bookmarks
are enabled).
The Firebird bug tracker is not available now -
http://tracker.firebirdsql.org/secure/Dashboard.jspa and I will create
issue when this problem will be solved.
Regards
Alexander
Hi Ocke,
I have created the issue -
http://tracker.firebirdsql.org/browse/ODBC-106 and I have attached the
fixed driver for your testing there.
Thanks for the fast fix. It works. Now I stumble about the next problem
when I try to insert a row. But that's another story I have to debug.
All I get is a error message which include only wild characters.

Best regards,

Ocke
Post by Alexander Potapchenko
Regards,
Alexander
Loading...