Subject Re: [IB-Architect] New API: Exceptions
Author Dalton Calford
Hi Jim,


> Your replies should be well thought out and carefully worded. You
> may start writing.

You know with my tendancy to blather, you were asking for it when you
made this post...

:)


> But here a question for you and the other InterArchies: If in the
> above example you assign the int32 to the parameter what should
> show up in the blob? And if the problem with a de facto clob,
> would the answer be different.

Jim,

This is one issue I have wanted to attack many times. Both on the
clients ability to use sql to insert blobs via a DDL script (for object
descriptions) and on the server for blob manipulation.

I ended up writing my own WSQL style DDL program in Delphi using Jason's
IBO just to run custom scripts for metadata creation. (I added about 30
new commands to the DDL language and had IBO do the work)

So, in order to answer your question, ALL inserts into a blob,
regardless of thier datatype (or char size in reference to different
languages) should be put raw into the blob.
If the developer, wants the Integer to be represented by characters
instead of it's binary (byte,word, double etc) then they need to cast it
into a string before commiting it to the blob.

It should be up to the developer to know what type of data is in any
particular blob, and how to access it.

It would be very nice, to allow the developer to access any type of
data, (blob, integer, character, date, etc) as if it was an array of
bytes.
The developer could create substring functions, byte manipulation
functions, blob manipulation routines, specialized CAST routines, (this
is for casting from one user defined domain type to another user defined
domain type).

But this is getting more server side than what you where origionally
asking.

What I suggest is, any value to be inserted into a blob, gets inserted
raw.
If you get a sql insert that say insert into foo (blob_field) values
(:varA || :varB);
You insert both values one after the other, no conversion work on your
part (a simple raw write).

The less specialization you put into your routines, gives us the most
flexibility (more work, but, that is what we do for a living).

best regards

Dalton