Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
getopt.c | 2020-05-11 | 17.6 kB | |
getopt.h | 2020-05-11 | 489 Bytes | |
memmove.c | 2020-05-11 | 1.4 kB | |
readme.txt | 2020-05-11 | 2.9 kB | |
stderr.c | 2020-05-11 | 3.0 kB | |
stderr.h | 2020-05-11 | 1.6 kB | |
updblob.ec | 2020-05-11 | 4.4 kB | |
Totals: 7 Items | 31.4 kB | 0 |
From infmx!obelix.informix.com!johnl@uunet.UU.NET Thu Nov 5 06:30:00 1992 Date: Thu, 5 Nov 92 10:57:10 GMT From: johnl@obelix.informix.com (Jonathan Leffler) Message-Id: <9211051057.AA17848@obelix.informix.com> To: clay@panix.com Subject: Re: Inserting BLOB into Database Table Cc: informix-list@rmy.emory.edu X-Informix-List-Id: <list.1572> You don't say what tools you have available... If you have ISQL, the following info may be of relevance: >From: johnl (Jonathan Leffler) >Date: Wed Nov 4 09:53:59 1992 >To: skidwell@jupiter >Subject: Re: loading into blob space thru sql > >>Date: Tue, 3 Nov 92 14:45:21 CST >>From: skidwell@jupiter (Sherri Kidwell) >>To: tech@jupiter >>Subject: loading into blob space thru sql > >>I have a customer that wants to load a gif file as a blob into >>a table through SQL only. Can this be done? If so, how? > >Dear Sherri, > >The only possible route is through The PROGRAM attribute in the blob field >attributes of a Perform screen -- the load command requires the data in its >own format, and nothing else gets close. > >The program specified by the form will be invoked with the name of a >temporary file as the blob. When the program returns, the contents of that >file will be used as the blob. So, the obvious solution seems to be a >script of some sort which allows the user to specify a GIF file name. I >tried a solution which removed the original temporary file, and did a >symbolic link to the GIF file. Perform should have cleaned up after itself >by removing the symbolic link. However, this did not work satisfactorily >-- it zapped the script I had developed (because I pretended that the >script was a GIF file), which was a nuisance though hardly serious. It >seems that the successful way of doing it is to copy the GIF file over the >temporary file, which leads to the following Bourne Shell script: > >echo >#echo -n "Enter name of GIF file: " >echo "Enter name of GIF file: \c" >read file >cp $file $1 > >The first echo places the prompt on the line after the "Please wait!" >message issued by Perform. The commented out echo might be necessary on a >BSD system where the Bourne shell does not recognise the "\c" >metacharacter, which means suppress the newline. > >Yours, >Jonathan Leffler (johnl@obelix) If you ESQL/C, you may be interested in the program in the shell archive below. You may not need getopt.c and/or memmove.c, but I've supplied them just in case. The code was developed on Intercative 386/IX 3.2.2 under OnLine and ESQL/C 5.00.UC1. You use the program updblob as: updblob -d database -t table -k column1=1234,column2=ABC -f blob-file Put quotes around the key strings if there are spaces in the key. I cannot guarantee the behaviour of the key parsing code if you have either commas or equals signs in the key string. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h> : "@(#)shar.sh 1.8"