HELP! BLOB is killing me
Posted in 2003
Topics: General Discussion
Hi All, I am trying to select a BLOB into memory. Can anybody please let me know what had gone wrong? char rawbuf[1000]; $loc_t buf; buf.loc_loctype = LOCMEMORY; buf.loc_bufsize = sizeof(rawbuf); buf.loc_size = sizeof(rawbuf); buf.loc_buffer = rawbuf; buf.loc_oflags = 0; buf.loc_mflags = 0; buf.loc_indicator = -1; // What is this for? I am getting ISAM 451, but I have already make sure that the memory that I have allocated is more than twice actually needed. The informix reference is 100% useless and ambigious. :( Really appreciate if somebody can help. Thanks in advance.
Kwan wrote: > I am trying to select a BLOB into memory. Can anybody please let me > know what had gone wrong? > > char rawbuf[1000]; > $loc_t buf; > buf.loc_loctype = LOCMEMORY; > buf.loc_bufsize = sizeof(rawbuf); > buf.loc_size = sizeof(rawbuf); > buf.loc_buffer = rawbuf; > buf.loc_oflags = 0; > buf.loc_mflags = 0; > buf.loc_indicator = -1; // What is this for? > > I am getting ISAM 451, but I have already make sure that the memory > that I have allocated is more than twice actually needed. > > The informix reference is 100% useless and ambigious. :( > > Really appreciate if somebody can help. I told you where to go to find the answers. Have you been and looked? I don't recall the details - they're there where I told you to look. So, was the code too hard to understand? Or was there some other problem? (I said go to http://www.iiug.org/software and get the SQLCMD code, just in case you've forgotten what I said.) The indicator is used to tell the database that the value is null, or not, when you insert data or update data. It is used by the database to tell you whether the values is null, or not, when you select data from the database. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/