 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Nicholas D. Wolfwood Guest
|
Posted: Mon Nov 24, 2003 2:09 pm Post subject: [Delphi6] problems using DBEXPRESS TSQLSTOREDPROC with ORACL |
|
|
with DataModule.StoredProc do
begin
StoredProcName:='PACKAGE.FUNCTION1';
Params.Clear;
PARAMS.CreateParam(ftInteger,'RESULT',ptResult);
PARAMS.CreateParam(ftString,'Par1',ptInput);
PARAMS.CreateParam(ftString,'Par2',ptInput);
PARAMS.CreateParam(ftString,'Par3',ptOutput);
ParamByName('Par1').AsString:=szValuePar1;
ParamByName('Par2').AsString:=szValuePar2;
ExecProc;
end;
when i reach ExecProc Delphi raise an exception:
'List index out of bounds (0)'
It seems it can't see function inside Package
Please, help me.
Nicholas D. Wolfwood
--
"A volte ti sento cosė vicina...
A volte ti sento cosė lontana...
Certo che hai proprio un cellulare di merda!"
<Leva IL_PIEDE_DAL_FRENO (e lascia gli underscore nel nome) se vuoi rispondere in privato.>
http://it.groups.yahoo.com/group/206life/
|
|
| Back to top |
|
 |
Dmitry Arefiev [gs-soft.r Guest
|
Posted: Mon Nov 24, 2003 8:38 pm Post subject: Re: [Delphi6] problems using DBEXPRESS TSQLSTOREDPROC with O |
|
|
Hello !
You got in few problems:
1) Oracle dbExpress driver does not support stored
functions. It is fixed internally by Borland, but fixed
driver is not accessible. If you want, you can contact
with R. Theivendran directly.
2) Oracle dbExpress driver support only ftFmtBCD
as data type for NUMBER parameters / field types.
3) To get access to packages procedures / functions
use property PackageName for package name and
StoredProcName for procedure / function name inside
of package.
4) "PACKAGE" is a reserved word in Oracle. So,
your package name is bad. Lets rename it to "PACK".
So, if (1) will be fixed, then following should work:
with SQLStoredProc1 do
begin
PackageName := 'PACK';
StoredProcName:='FUNCTION1';
Params.Clear;
PARAMS.CreateParam(ftFMTBcd,'RESULT',ptResult);
PARAMS.CreateParam(ftString,'Par1',ptInput);
PARAMS.CreateParam(ftString,'Par2',ptInput);
PARAMS.CreateParam(ftString,'Par3',ptOutput);
ParamByName('Par1').AsString:=szValuePar1;
ParamByName('Par2').AsString:=szValuePar2;
ExecProc;
end;
Regards,
Dmitry
--
Dmitry Arefiev, gs-soft Company, community.gs-soft.com
Personal - www.da-soft.com
SAPx - Delphi to SAP R/3 direct access
Saphir - SAP R/3 metadata on your fingertips
MetaBase - ERWIN model in Delphi applications
NCOCI8 - Freeware Delphi to ORACLE direct access
Nicholas D. Wolfwood wrote:
| Quote: | with DataModule.StoredProc do
begin
StoredProcName:='PACKAGE.FUNCTION1';
Params.Clear;
PARAMS.CreateParam(ftInteger,'RESULT',ptResult);
PARAMS.CreateParam(ftString,'Par1',ptInput);
PARAMS.CreateParam(ftString,'Par2',ptInput);
PARAMS.CreateParam(ftString,'Par3',ptOutput);
ParamByName('Par1').AsString:=szValuePar1;
ParamByName('Par2').AsString:=szValuePar2;
ExecProc;
end;
when i reach ExecProc Delphi raise an exception:
'List index out of bounds (0)'
It seems it can't see function inside Package
Please, help me.
Nicholas D. Wolfwood
|
|
|
| Back to top |
|
 |
Dmitry Arefiev [gs-soft.r Guest
|
Posted: Mon Nov 24, 2003 8:40 pm Post subject: Re: [Delphi6] problems using DBEXPRESS TSQLSTOREDPROC with O |
|
|
Forget to say ... I am remembering Delphi 6
driver does not support packages at all ...
Regards,
Dmitry
--
Dmitry Arefiev, gs-soft Company, community.gs-soft.com
Personal - www.da-soft.com
SAPx - Delphi to SAP R/3 direct access
Saphir - SAP R/3 metadata on your fingertips
MetaBase - ERWIN model in Delphi applications
NCOCI8 - Freeware Delphi to ORACLE direct access
Dmitry Arefiev [gs-soft.ru] wrote:
| Quote: | Hello !
You got in few problems:
1) Oracle dbExpress driver does not support stored
functions. It is fixed internally by Borland, but fixed
driver is not accessible. If you want, you can contact
with R. Theivendran directly.
2) Oracle dbExpress driver support only ftFmtBCD
as data type for NUMBER parameters / field types.
3) To get access to packages procedures / functions
use property PackageName for package name and
StoredProcName for procedure / function name inside
of package.
4) "PACKAGE" is a reserved word in Oracle. So,
your package name is bad. Lets rename it to "PACK".
So, if (1) will be fixed, then following should work:
with SQLStoredProc1 do
begin
PackageName := 'PACK';
StoredProcName:='FUNCTION1';
Params.Clear;
PARAMS.CreateParam(ftFMTBcd,'RESULT',ptResult);
PARAMS.CreateParam(ftString,'Par1',ptInput);
PARAMS.CreateParam(ftString,'Par2',ptInput);
PARAMS.CreateParam(ftString,'Par3',ptOutput);
ParamByName('Par1').AsString:=szValuePar1;
ParamByName('Par2').AsString:=szValuePar2;
ExecProc;
end;
Regards,
Dmitry
Nicholas D. Wolfwood wrote:
with DataModule.StoredProc do
begin
StoredProcName:='PACKAGE.FUNCTION1';
Params.Clear;
PARAMS.CreateParam(ftInteger,'RESULT',ptResult);
PARAMS.CreateParam(ftString,'Par1',ptInput);
PARAMS.CreateParam(ftString,'Par2',ptInput);
PARAMS.CreateParam(ftString,'Par3',ptOutput);
ParamByName('Par1').AsString:=szValuePar1;
ParamByName('Par2').AsString:=szValuePar2;
ExecProc;
end;
when i reach ExecProc Delphi raise an exception:
'List index out of bounds (0)'
It seems it can't see function inside Package
Please, help me.
Nicholas D. Wolfwood
|
|
|
| Back to top |
|
 |
Nicholas D. Wolfwood Guest
|
Posted: Tue Nov 25, 2003 7:31 am Post subject: Re: [Delphi6] problems using DBEXPRESS TSQLSTOREDPROC with O |
|
|
Stavo discutendo con l'operatore Tim secondo il quale il prefisso di
Roma era uguale al numero di nippocoreane vendute in Italia, quando
"Dmitry Arefiev [gs-soft.ru]" <darefiev (AT) gs-soft (DOT) ru> scrisse:
| Quote: | Forget to say ... I am remembering Delphi 6
driver does not support packages at all ...
|
thanks a lot!
Regards
Nicholas D. Wolfwood
--
"A volte ti sento cosė vicina...
A volte ti sento cosė lontana...
Certo che hai proprio un cellulare di merda!"
<Leva IL_PIEDE_DAL_FRENO (e lascia gli underscore nel nome) se vuoi rispondere in privato.>
http://it.groups.yahoo.com/group/206life/
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|