SQLDB/Firebird unable to open table with more than 128 fields.
Original Reporter info from Mantis: funkybeast
-
Reporter name: Funky Beast
Original Reporter info from Mantis: funkybeast
- Reporter name: Funky Beast
Description:
When trying to open a firebird database table with more than 128 fields,
firebird responded with the following error:
*
-Dynamic SQL Error
-SQL error code = -804
-Incorrect values within SQLDA structure
*
This only happens with TSQLQuery and TIBConnection combination.
fblib components has no problems opening such table (fenixsql).
flamrobin also has no problems opening such table.
lazdatadesktop has problem opening such table, as its based on sqldb.
I've attached a project to reproduce this scenario.
Steps to reproduce:
Build the attached project.
Setup a firebird user 'TEST' with password 'TEST'.
(or you can change the constants in the project with your own
user and password)
Set permissions on the compiled executables directory to allow
firebird to read/write.
(The program will create a firebird database file 'test.fdb' there.)
Run the executable in a console with a numeric argument to
specify max fields. (e.g. ./sqldb_test 128)
What the program does is it will first check if there is a 'test.fdb'
file in the directory it lives in and delete it. Next, it will
reconstruct 'test.fdb' with max fields specified by the program's argument.
If no argument is specified, it assumes max fields to be 150.
After constructing 'test.fdb', it will reopen the table in 'test.fdb'.
If everything runs fine, the program will return without showing
anything. An exception is displayed if it can't open the table.
My setup: svn fpc-2.2.5 r12903 on linux32.
As I do not comprehend the firebird API, I can't produce a patch.
Please post back here if there is a workaround or a patch.
Mantis conversion info:
- Mantis ID: 13340
- Version: 2.2.5
- Fixed in version: 2.4.0
- Fixed in revision: r12965 (#24d3fb02)
- Monitored by: » funkybeast (Funky Beast)
- Target version: 2.2.5