Page 1 of 1

Error : Teste.CreateTemporary(ltClob);

Posted: Wed 27 Jun 2007 19:34
by rcdill
Dear friends,

We have one stored procedure in oracle (9i) for sending of emails. When the method Execute is called appears the error: "Lob Locator Should Be Inited".

The commented line ('//Teste.CreateTemporary(ltClob);') is causing an error “Function is not suported”.

Below the used code:

procedure TForm1.Button1Click(Sender: TObject);
var
Teste : TOraLob;
begin
try
Teste:=TOraLob.Create(OraSession1.OCISvcCtx);
Teste.AllocLob;
//Teste.CreateTemporary(ltClob);
Teste.LoadFromFile('C:\Arquivos de programas\Borland\Delphi5\Projects\Unit1.dfm');
OSP1.Prepare;
OSP1.ParamByName('P_FROM_NAME').Value:='[email protected]';
OSP1.ParamByName('P_TO_NAME').Value:='[email protected]';
OSP1.ParamByName('P_CC_NAME').Value:='';
OSP1.ParamByName('P_CCO_NAME').Value:='';
OSP1.ParamByName('P_SUBJECT').Value:='Teste de mensagem';
OSP1.ParamByName('P_MESSAGE').Value:='Teste de mensagem';
OSP1.ParamByName('P_ANEXO').AsOraClob:=Teste;
OSP1.Execute;
except
on E: Exception do
begin
raise Exception.Create('Erro : ' + E.message);
end;
end;
end;


If somebody will be able to help, since already is thankful.
Rcdill.

Posted: Mon 02 Jul 2007 08:47
by Challenger
Please specify the versions of ODAC and Oracle you use.

Posted: Mon 02 Jul 2007 11:48
by rcdill
Challenger wrote:Please specify the versions of ODAC and Oracle you use.
It forgives for the imperfection. The version is 5.55.0.20 - Delphi 5.

Thanks.

Posted: Mon 02 Jul 2007 12:41
by Challenger
TOraLob.CreateTemporary with the Net option was supported in ODAC 5.55.1.24. Please install the latest build of ODAC 5. It is ODAC 5.80.0.42. You should also call the TOraLob.WriteLob method before calling the Execute method.

Posted: Mon 02 Jul 2007 12:50
by rcdill
Challenger wrote:TOraLob.CreateTemporary with the Net option was supported in ODAC 5.55.1.24. Please install the latest build of ODAC 5. It is ODAC 5.80.0.42. You should also call the TOraLob.WriteLob method before calling the Execute method.
Thanks Challanger. I go to try to make this.