Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Long Raw stores a JPG
Hi there,
I have a table that contains a field called 'IMAGE' which is of type
LONG RAW,
and contains a JPG file. I am using Oracle C++ objects to access this
table, and
I want to extract this JPG to a file. This is the code I have created:
char *buff = new char[80000]; long nread; FILE *fp = fopen("TEMP.JPG","wb+"); /* dyn is the instance of the database */ dyn.GetFieldValue("IMAGE", (void *) buff, 80000, &nread); fwrite(buff,nread,1,ofp); fclose(fp); delete buff;
But I can't seem to view the jpg file with lview. Am I retrieving the
field
correctly, or am I missing something?
-- Thanks, | "We live in a society of laws. David J. Pierce | Why do you think I took you Programmer Consultant | to see all those Police Academy Computing And Communications | movies!!!" Memorial University Of Newfoundland | - H. SimpsonReceived on Fri Mar 07 1997 - 00:00:00 CST