What causes EOraError and EDBError errors ?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
shamilsons
Posts: 2
Joined: Fri 03 Jul 2009 05:32

What causes EOraError and EDBError errors ?

Post by shamilsons » Fri 03 Jul 2009 05:48

Hello everyone,

I am using Delphi5 and ODAC components.
The problem is: I moved all my functions to Util file and created instance of TOraQuery in one of the my main function in Util file and session component is residing in the file who includes Util file. So when I run my application i get this error "raised EOraError exception with message 'NET:Unknown error 1' " or "raised EDBError exception with message 'Unknown error 1' " what does this error means ? i searched on the internet and could not find any valuable information. In the session Net is checked.
Below is my code samples

Util file

Code: Select all

var
    OraQADB: TOraQuery;

procedure process_given_form(f:TForm);
....
....
  OraQADB:= TOraQuery.Create(f);
  OraQADB.AutoCommit:=True;
...
end;

//Add component to the database
procedure addComponentToDB(obj:TControl);
var qstring,tid,path,cname,capLang: String;
begin
   path:= prName+getPath(obj);
   cname:= obj.Name;
   if(not(checkComponentPath(path,cname))) then
   begin
    OraQADB.Close;
    OraQADB.SQL.Clear;
    OraQADB.SQL.Add('SELECT PERSONEL.SQX_TID.NEXTVAL AS TID FROM DUAL');
    OraQADB.ExecSQL;
    tid:= OraQADB.FieldByName('TID').AsString;
    capLang:= getComponentCaption(obj);
    qstring:='INSERT INTO PERSONEL.TRANSLATIONS (TID,SCRIPT_NAME,TAG,TR,EN,LOCAL) VALUES ('''+tid+''','''+path+''','''+cname+''','''+capLang+''','''+'English'+''','''+'Local Lang'''+')';
    //showMessage(qstring);
    OraQADB.Close;
    OraQADB.SQL.Clear;
    OraQADB.SQL.Add(qstring);
    OraQADB.ExecSQL;
   end;
end;

//check availability of the Componets path
function checkComponentPath(path:String;cname:String):Boolean;
begin
   OraQADB.Close;
   OraQADB.SQL.Clear;
   //if not assigned(OraQADB.Session) then showmessage('session yok');
   //if not assigned(DefaultSession) then showmessage('default session yok');
   OraQADB.SQL.Add('SELECT TAG FROM PERSONEL.TRANSLATIONS WHERE SCRIPT_NAME like '''+path+'''');
   OraQADB.Open; // ERROR OCCURS WHILE EXECUTING THIS STATEMENT
   if(cname = OraQADB.FieldByName('TAG').AsString) then
      Result:=True
   else
      Result:=False;
end;
File that includes Util

Code: Select all

var
   OraSessPersonel: TOraSession;
....
uses Util
procedure TForm1.prItemClick(Sender: TObject);
begin
    process_given_form(self);
end;
What is the problem. I started geting this error when i moved all my functions from file to Util.

thanks

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 03 Jul 2009 09:25

Try to set the Direct option of TOraSession to False. In this mode the error message can be more clear.

Post Reply