LOCFILE -454 problem
Posted in 1998
Topics: General Discussion
Hi, I've developed an application which run as an NT server on NT Server 4.0 running Informix 7.30. I have a problem when I try to insert a text blob from a file using the LOCFILE mechanism. It constantly returns a -454 error (loc_read() failed). I know the file is valid and open as I've been doing fread() calls previous to trying to insert the text blob. Does anyone know of anything specific I might have to do to get LOCFILE working under an NT service, or is there anything else I might be doing wrong ? (note this code was originally ported from UNIX where it works perfectly). Cheers. Ray. -- EndPos = ftell(GVars->EMailFilePtr); len = EndPos - CurrPos; (void) fseek(GVars->EMailFilePtr, CurrPos, SEEK_SET); FFMessage.loc_loctype = LOCFILE; an_fd = (int) (_fileno(GVars->EMailFilePtr)); FFMessage.loc_fd = an_fd; FFMessage.loc_oflags = LOC_RONLY; FFMessage.loc_size = len; FFMessage.loc_indicator = 0; EXEC SQL execute procedure fempInsertFFMsg(:SQLSerialNo, :SQLEMDetails->From_ID, :SQLEMDetails->To_ID, :SQLEMDetails->EMailType, :FFMessage); <This constantly returns the -454 error).