Hi,
I have some overloading problems. A possible solution could be RECORD TYPES, but does DOA support record types as parameters to call stored procedures?
I will give an example what will describe the problem.
-- ---------------------------
-- PLSQL
-- ---------------------------
Procedure Lock_record(Code Tab1.Code%type); -- number
Procedure Lock_Record(ID Tab2.ID%Type); -- number
// Delphi
with query do
begin
close;
sql.clear;
sql.add('begin');
sql.add(' package1.Lock_Record(1);');
sql.add('end;')
execute;
end;
When I try to execute this, the server has no idea which procedure "Lock_record" it has to take. Because both have the same dataType (number).
So my plan was to provide a recordType as parameter, but then it is not possible to give it in as a variable.
Procedure Lock_record(rowtab1 Tab1%rowtype);
Procedure Lock_Record(rowtab2 Tab2%RowType);
It is also handy if you can give a complete record as a parameter when you have to insert or update rows in a table.
Also making use of PLSSQL Records (from the package wizard) isn't a real suitable solution.
Does anyone know what could be the solution for this overloading problem.