BLOB Field HELP
Posted: Thu 27 Apr 2006 16:24
I am using Delphi 7 with ODAC 5.70.0.30 13.04.06 and .NET option
This is the code I am using:
q := 'insert into tblaudio (dtbegintime,dtendtime,szsector,szFacid,blobsound) ';
q := q + 'VALUES ';
q := q + '(:pdtbegintime,:pdtendtime,:pszsector,:pszFacid,:pblobsound)';
OraSoundQuery.SQL.clear;
OraSoundQuery.SQL.Text := q;
OraSoundQuery.ParamByName('pszFacid').Asstring := FacilityEdit.text;
OraSoundQuery.ParamByName('pszsector').Asstring := sectorcombo.text;
OraSoundQuery.ParamByName('pdtbegintime').Asdatetime := G_StartTime;
OraSoundQuery.ParamByName('pdtendtime').Asdatetime := G_EndTime;
OraSoundQuery.ParamByName('pblobsound').ParamType := ptInput; //to transfer lob data to oracle
OraSoundQuery.ParamByName('pblobsound').AsOraBlob.OCISvcCtx := OraSession1.OCISvcCtx;
OraSoundQuery.ParamByName('pblobsound').AsOraBlob.LoadFromFile(audiocapture1.audiofilename);
OraSoundQuery.ParamByName('pblobsound').AsOraBlob.WriteLob; I get the error "LOB IS NOT ALLOCATED"
OraSoundQuery.Execute;
I have NEVER used a BLOB field for anything. Can anyone point me in the right direction?
Thanks
This is the code I am using:
q := 'insert into tblaudio (dtbegintime,dtendtime,szsector,szFacid,blobsound) ';
q := q + 'VALUES ';
q := q + '(:pdtbegintime,:pdtendtime,:pszsector,:pszFacid,:pblobsound)';
OraSoundQuery.SQL.clear;
OraSoundQuery.SQL.Text := q;
OraSoundQuery.ParamByName('pszFacid').Asstring := FacilityEdit.text;
OraSoundQuery.ParamByName('pszsector').Asstring := sectorcombo.text;
OraSoundQuery.ParamByName('pdtbegintime').Asdatetime := G_StartTime;
OraSoundQuery.ParamByName('pdtendtime').Asdatetime := G_EndTime;
OraSoundQuery.ParamByName('pblobsound').ParamType := ptInput; //to transfer lob data to oracle
OraSoundQuery.ParamByName('pblobsound').AsOraBlob.OCISvcCtx := OraSession1.OCISvcCtx;
OraSoundQuery.ParamByName('pblobsound').AsOraBlob.LoadFromFile(audiocapture1.audiofilename);
OraSoundQuery.ParamByName('pblobsound').AsOraBlob.WriteLob; I get the error "LOB IS NOT ALLOCATED"
OraSoundQuery.Execute;
I have NEVER used a BLOB field for anything. Can anyone point me in the right direction?
Thanks