Home > Back-end >  DEPHI7 through dbexpress access ORACLE database problems
DEPHI7 through dbexpress access ORACLE database problems

Time:09-22

I use the normal TSQLConnection + TSQLQuery execute SQL when everything is normal

But I used during a visit to a stored procedure TSQLConnection + TSQLStoredProc always quote 'List index out of bounds (0)

Stored procedures are
 CREATE OR REPLACE PROCEDURE sp_lj (rc_result OUT VARCHAR2 - returns the 
) IS

The BEGIN
Rc_result:=';
The exception
The when others then
Rc_result:='0: : an error occurred when processing | | SQLERRM;
The ROLLBACK.
The RETURN;
END;


The client is called
 procedure TForm1. Button2Click (Sender: TObject); 
The begin
SQLConnection1. Connected:=true;
If SQLConnection1. Connected then
Showmessage (' OK ') else showmessage (" not OK ");

TmpSQLSP. Close;
TmpSQLSP. StoredProcName:='sp_lj';
//tmpSQLSP. SchemaName:='dbo';
TmpSQLSP. Params. The Clear;
TmpSQLSP. Params. CreateParam (ftString, 'rc_result ptOutput);

Try
TmpSQLSP. ExecProc;//here to perform error


Except,
On e: the exception do
The begin
Showmessage (e.M essage);
exit;
end;
end;


Edit2. Text:=tmpSQLSP. ParamByName (' RC_Result). The Value;

TmpSQLSP. Free;
end;


The execution result is

CodePudding user response:


TSQLStoredProc properties..

CodePudding user response:

No one used, sweat profusely

CodePudding user response:

Problems that could go in this
Edit2. Text:=tmpSQLSP. ParamByName (' RC_Result). The Value;
You try to take away the
  • Related