non-blob fields opening

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
Choppers
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.02.2008, 18:42

non-blob fields opening

Post 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.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Can you provide a sample project+db file? Maybe somebody (sandeep or cipto??) wants to give it a look.

Mark
Image
Choppers
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.02.2008, 18:42

Post 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.
You do not have the required permissions to view the files attached to this post.
Choppers
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.02.2008, 18:42

Post by Choppers »

Screenshot showing further info.
You do not have the required permissions to view the files attached to this post.
User avatar
cipto_kh
Senior Boarder
Senior Boarder
Posts: 83
Joined: 28.09.2005, 11:22
Location: Indonesia
Contact:

Post 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.
Choppers
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 01.02.2008, 18:42

Post 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.
Post Reply