Re: Inserting into BLOBS
Posted in 1997
Dragi Raos wrote > >Lou Person <lperson@mcny.com> wrote in article ><5l7uh4$d87@cssun.mathcs.emory.edu>... >> We have looked at it, and it worked. >> We also read in the documentation that it >> works quite well for everything except >> UPDATES. I was hoping that someone might >> have come up with a quick fix, as we are new to >> this list. > >I am not sure if this will help, but perl 4.036 'perlsql' code for >Informix had a subtle bug (an index incremented in 'for' loop control >part, in stead if body), that prevented it to work with blobs. I don't >remember execactly, but I can take a look. The point is that the code is >quite well organised and commented, so it should be relatively easy to >drop around few debugging messages and see what is happening (if there >indeed is a problem with this, as far as I understand, perl 5 code). Also the primary question was dedicated to Perl5 - but there is a patch to isqlperl 'prepare_input_sqlda' (starting about? line# 1267 in isqlperl.pec): #ifdef ONLINE if (nblobs) { if ((blobbuf = nnew_(nblobs, loc_t)) == NULL) fatal("out of memory"); for (i = 0, par = parameters->sqlvar; nblobs; ++i, ++par) { if (par->sqltype == CLOCATORTYPE) { par->sqldata = (char *) &blobbuf[--nblobs]; locp = (loc_t *) par->sqldata; locp->loc_loctype = LOCMEMORY; } } return ((char *) blobbuf); } .... -- Chris Drauch <cdr@xteam.co.at> ... just speaking for myself ...