Code: Select all
procedure TForm1.TestSession(aUseOci7: boolean);
var
os1:TOraSession;
q:TOraQuery;
sp:TOraStoredProc;
begin
os1:=TOraSession.Create(nil);
os1.Username:='***';
os1.Password:='***';
os1.Server:='***';
os1.Pooling:=False;
os1.Options.UseOCI7:=aUseOCI7;
os1.Connect;
q:=TOraQuery.Create(nil);
q.Session:=os1;
q.SQL.Text:='select 1 a from dual';
q.Open;
ShowMessage(q.FieldByName('a').AsString);
q.Close;
sp:=TOraStoredProc.Create(nil);
sp.Session:=os1;
sp.StoredProcName:='DBMS_APPLICATION_INFO.read_module';
sp.PrepareSQL;
sp.Execute;
ShowMessage(sp.ParamByName('module_name').AsString);
os1.Disconnect;
q.Free;
sp.Free;
os1.Free;
end;
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
TestSession(False); // all working fine
TestSession(True); // error on ANY procedure executing
end;
Code: Select all
First chance exception at $7600C42D. Exception class EOraError with message
'ORA-00002: Message 2 not found; product=RDBMS; facility=ORA'.
Tested with Oracle client 9/11. Delphi XE5.