Board index » delphi » Using Interbase array of type

Using Interbase array of type

Hi all,

I do not know if this is a Delphi or Interbase issue, however I am using D5
with Interbase 6, and trying to use the array of type data definition.

I add a field such as

add SomeArrayField integer [6]

or

add SomeArrayField integer[1:6]

which seems to work just fine, and Interbase identifies it as such.

However when I try to access this Field through a Delphi table or Query, the
size shown on the associated TBytesField is 8. It seems, regardless of how
many array elements I define, the size remains 8. Thus when I try to access
the data I get an invalid variant reference because I am attempting to
access data past the first 8 bytes. If I manually attempt to change "Size"
of the associated TBytesField to what it should be, I get an error that the
size of the actual data does not match the size specified.

Anyone know what is going on here.

TIA,
Eric

 

Re:Using Interbase array of type


You don't say how you are accessing the database, are you using the API
directly?
If you use IBO, I think an example (on using array fields) is provided.

Regards,
Aage J.

Quote
"Eric H. Johnson" wrote:

> Hi all,

> I do not know if this is a Delphi or Interbase issue, however I am using D5
> with Interbase 6, and trying to use the array of type data definition.

> I add a field such as

> add SomeArrayField integer [6]

> or

> add SomeArrayField integer[1:6]

> which seems to work just fine, and Interbase identifies it as such.

> However when I try to access this Field through a Delphi table or Query, the
> size shown on the associated TBytesField is 8. It seems, regardless of how
> many array elements I define, the size remains 8. Thus when I try to access
> the data I get an invalid variant reference because I am attempting to
> access data past the first 8 bytes. If I manually attempt to change "Size"
> of the associated TBytesField to what it should be, I get an error that the
> size of the actual data does not match the size specified.

> Anyone know what is going on here.

> TIA,
> Eric

Re:Using Interbase array of type


Quote
"Aage Johansen" <aage.johan...@kreftreg.no> wrote in message

news:39D83CD9.C5087A67@kreftreg.no...

Quote
> You don't say how you are accessing the database, are you using the API
> directly?
> If you use IBO, I think an example (on using array fields) is provided.

I am accessing through standard BDE, and associated TQuery and TTable
controls, not Interbase Express.

Thanx,
Eric

Re:Using Interbase array of type


Quote
Eric H. Johnson wrote in message <39d7bb16$1_2@dnews>...

>I do not know if this is a Delphi or Interbase issue, however I am using D5
>with Interbase 6, and trying to use the array of type data definition.

>I add a field such as

>add SomeArrayField integer [6]

The standard BDE database components cannot handle array fields in
Interbase. I believe IBObjects supports this.

--
Wayne Niddery (WinWright Inc.)
RADBooks - http://members.home.net/wniddery/
"I have never understood why it is "greed" to want to keep the money you
have earned but not greed to want to take someone else's money." - Thomas
Sowell

Re:Using Interbase array of type


"Wayne Niddery (TeamB)" <winwri...@chaffhome.com> wrote in message
news:39d8b4a4_2@dnews...

Quote
>> The standard BDE database components cannot handle array fields in

Interbase. I believe IBObjects supports this. <<

That is kind of what I suspected. I do not want to use the IBObjects because
I will likely change to SQL Server or Oracle, which have analogous but
differently implemented constructs such as SQL Server's "binary" data type.

Thanx,
Eric

Re:Using Interbase array of type


Quote
Eric H. Johnson wrote in message <39d8c758_2@dnews>...

>That is kind of what I suspected. I do not want to use the IBObjects
because
>I will likely change to SQL Server or Oracle, which have analogous but
>differently implemented constructs such as SQL Server's "binary" data type.

SQL Server's "binary" data type should be more analogous to a standard Blob
field shouldn't it? Interbase and the BDE handle blobs just fine.

--
Wayne Niddery (WinWright Inc.)
RADBooks - http://members.home.net/wniddery/
I love deadlines. I like the whooshing sound they make as they pass by -
Douglas Adams

Other Threads