Page 1 of 1

non-blob fields opening

Posted: 08.04.2008, 17:37
by Choppers
Using 6.6.2, with Firebird 2.03, with protocol=firebird-2.0

I'm using a TzTable to open the sample employee.fdb, but certain tables won't open, giving the error :

"Cannot access blob record in column x with type y"

where x is a column number, and y is a non-blob field (integer or string).

Checking the tables with a third party tool, it seems the fields in question are not blob fields (integer or string).

The exception is raised in 'TZAbstractResultSet.CheckBlobColumn()'.

The table columns are read correctly during the InternalOpen, but by the time TZCachedResultSet.Fetch is processed, the column in question has changed from stString to stBinaryStream.

Posted: 09.04.2008, 10:25
by mdaems
Can you provide a sample project+db file? Maybe somebody (sandeep or cipto??) wants to give it a look.

Mark

Posted: 09.04.2008, 10:53
by Choppers
I've attached the db, taken, unmodified, from a fresh install of Firebird 2.03. I'll post a screenshot of the error, also showing table structure.

To re-create, drop a TZConnection and a TZTable on a form, set the connection as

user : sysdba
password : masterkey
protocol : firebird-2.0
database : [attached]

then set the table to :

connection : [tzconnection]
table : JOB or PROJ_DEPT_BUDGET

then set table active.

Posted: 09.04.2008, 10:55
by Choppers
Screenshot showing further info.

Posted: 14.04.2008, 08:32
by cipto_kh
The problem is in the LANGUAGE_REQ field, it's an array field type.

Array field is cann't access directly by it's field name, so you cann't use table in here, you must use query, and the query to display it will be like this:

select
JOB_CODE, JOB_GRADE, JOB_COUNTRY, JOB_TITLE,
MIN_SALARY, MAX_SALARY, JOB_REQUIREMENT,
LANGUAGE_REQ[1], LANGUAGE_REQ[2], LANGUAGE_REQ[3],
LANGUAGE_REQ[4], LANGUAGE_REQ[5]
from job

But it cannot update the value of array field directly from a grid or any DB control. It must be using sql statement, you can search google for the way to insert array.

Posted: 14.04.2008, 10:48
by Choppers
Thanks cipto_kh, problem solved.

If anyone else is curious, a value in rdb$fields.dimensions will indicate an array, the dimensions for the array are found in rdb$field_dimensions.

Thanks also to mdaems.

Choppy.