Re: Blob manipulation
Posted in 1999
Right now, I'll be doing this using ESQL/C. Although there is a talk of this having to be implemented using either 4GL or VB 5.0 I'll look into the flags that you mentioned. Thanks. Also, can these flags be used to join up two BLOB variables. After a few requirement changes last night, the problem looks something like this. BLOB variable1 = BLOB variable 2 + string + BLOB variable 3; ----- Original Message ----- From: Art S. Kagel <kagel@bloomberg.net> To: <informix-list@iiug.org> Sent: Monday, August 09, 1999 9:50 PM Subject: Re: Blob manipulation > george wrote: > > > > I'm having a few problems with manipulating Blob variables and blob type > > columns in Informix. > > > > I have a table having a column of type Text. My requirement is to join = > > up > > all the Text data (i.e. all the text data in that table from the = > > particular > > column) in a Text variable to form one large peice of data. Logically > > speaking, I have to concatenate the Text data from each row with the = > > Text > > data in the next row. Now I've found out that we can't use the = > > concatenation > > operator '||' we use for strings. I urgently need a way out of this. = > > You do not state what front-end software you are using. If this needs to > be done in an ESQL/C program look into the LOC_USER FETCH type flag. This > allows you to write your own internal fetch functions for the BLOB which > can append one row to the previous rows easily. This also happens to be > the fastest way to FETCH BLOBs so it is a good technique to learn. There > is sample code in the samples directories also look at my myschema.ec > program which uses LOC_USER to fetch fragmentation and view definitions. > > If you are using 4GL you can write an ESQL/C module to fetch those rows > using the method above and call the function from 4GL. There is also > sample code for writing 4GL callable ESQL/C code. > > Art S. Kagel