Board index » delphi » Using dbExpress Stored Procedure Component and Oracle 9i Stored Procedure

Using dbExpress Stored Procedure Component and Oracle 9i Stored Procedure

I'm trying to execute a stored procedure on an Oracle database with
parameters. When I call the ExecProc method I get " List index out of bounds
(0)". I created the parameters dynamically using Params.CreateParam method.
I also created the parameters manually by selecting the component and adding
them to the params (Tparams) property. The stored procedure basically
inserts the data into two tables.

Any help would be appreciated.

Here's the Oracle Stored Procedure below:

CREATE OR REPLACE PROCEDURE SYSDBA.SP_INS_OBJ_DATA_STRING (
 p_DAT_STR_UNIQUE_ID  INTEGER,
 p_DAT_STR_VERSION  INTEGER := 1,
 p_DAT_STR_MODIFIED_BY INTEGER,
 p_DAT_STR_MODIFIED_DATE TIMESTAMP := SYSDATE,
 p_DAT_STR_MODIFIED_TYPE INTEGER := 12,
 p_DAT_STR_LANGUAGE_ID INTEGER,
 p_DAT_STR_DATA   CLOB
)
AS

BEGIN

INSERT INTO OBJECT_DATA_STRING (
DAT_STR_UNIQUE_ID,DAT_STR_VERSION,DAT_STR_MODIFIED_BY,

DAT_STR_MODIFIED_DATE,DAT_STR_MODIFIED_TYPE,DAT_STR_LANGUAGE_ID,DAT_STR_DATA
)
 VALUES(p_DAT_STR_UNIQUE_ID,p_DAT_STR_VERSION,p_DAT_STR_MODIFIED_BY,
  p_DAT_STR_MODIFIED_DATE,p_DAT_STR_MODIFIED_TYPE,p_DAT_STR_LANGUAGE_ID,
  p_DAT_STR_DATA);

INSERT INTO HISTORY_DATA_STRING (
DAT_STR_UNIQUE_ID,DAT_STR_VERSION,DAT_STR_MODIFIED_BY,

DAT_STR_MODIFIED_DATE,DAT_STR_MODIFIED_TYPE,DAT_STR_LANGUAGE_ID,DAT_STR_DATA
)
 VALUES(p_DAT_STR_UNIQUE_ID,p_DAT_STR_VERSION,p_DAT_STR_MODIFIED_BY,
  p_DAT_STR_MODIFIED_DATE,p_DAT_STR_MODIFIED_TYPE,p_DAT_STR_LANGUAGE_ID,
  p_DAT_STR_DATA);

COMMIT;

END SP_INS_OBJ_DATA_STRING;

Thanks...

 

Re:Using dbExpress Stored Procedure Component and Oracle 9i Stored Procedure


normally this happenes when the # of parameters mismatch between the
TStoredProc and the actual stored procedures. check the # of parameters is
correct and also, try to use sue the BCD instead of number

good luck

david

Quote
"Daniel Johnson" <Daniel.John...@desktop-assistance.com> wrote in message

news:3d46bbc1$1_2@dnews...
Quote
> I'm trying to execute a stored procedure on an Oracle database with
> parameters. When I call the ExecProc method I get " List index out of
bounds
> (0)". I created the parameters dynamically using Params.CreateParam
method.
> I also created the parameters manually by selecting the component and
adding
> them to the params (Tparams) property. The stored procedure basically
> inserts the data into two tables.

> Any help would be appreciated.

> Here's the Oracle Stored Procedure below:

> CREATE OR REPLACE PROCEDURE SYSDBA.SP_INS_OBJ_DATA_STRING (
>  p_DAT_STR_UNIQUE_ID  INTEGER,
>  p_DAT_STR_VERSION  INTEGER := 1,
>  p_DAT_STR_MODIFIED_BY INTEGER,
>  p_DAT_STR_MODIFIED_DATE TIMESTAMP := SYSDATE,
>  p_DAT_STR_MODIFIED_TYPE INTEGER := 12,
>  p_DAT_STR_LANGUAGE_ID INTEGER,
>  p_DAT_STR_DATA   CLOB
> )
> AS

> BEGIN

> INSERT INTO OBJECT_DATA_STRING (
> DAT_STR_UNIQUE_ID,DAT_STR_VERSION,DAT_STR_MODIFIED_BY,

DAT_STR_MODIFIED_DATE,DAT_STR_MODIFIED_TYPE,DAT_STR_LANGUAGE_ID,DAT_STR_DATA
Quote
> )
>  VALUES(p_DAT_STR_UNIQUE_ID,p_DAT_STR_VERSION,p_DAT_STR_MODIFIED_BY,
>   p_DAT_STR_MODIFIED_DATE,p_DAT_STR_MODIFIED_TYPE,p_DAT_STR_LANGUAGE_ID,
>   p_DAT_STR_DATA);

> INSERT INTO HISTORY_DATA_STRING (
> DAT_STR_UNIQUE_ID,DAT_STR_VERSION,DAT_STR_MODIFIED_BY,

DAT_STR_MODIFIED_DATE,DAT_STR_MODIFIED_TYPE,DAT_STR_LANGUAGE_ID,DAT_STR_DATA

- Show quoted text -

Quote
> )
>  VALUES(p_DAT_STR_UNIQUE_ID,p_DAT_STR_VERSION,p_DAT_STR_MODIFIED_BY,
>   p_DAT_STR_MODIFIED_DATE,p_DAT_STR_MODIFIED_TYPE,p_DAT_STR_LANGUAGE_ID,
>   p_DAT_STR_DATA);

> COMMIT;

> END SP_INS_OBJ_DATA_STRING;

> Thanks...

Other Threads