Urgent !!!! -- ORA-01008: not all variables bound

Urgent !!!! -- ORA-01008: not all variables bound

Post by Shanmugam » Wed, 22 Jan 2003 05:24:01



Hi All,
In my application, at runtime, I am getting the following exception:

Description: Class: FdpMbrDatesData Method: executeQuery() :
SQLException
java.sql.SQLException: ORA-01008: not all variables bound

I am not able to guess what is the problem with the following portion
of the code.

pstmt = rO_conn.prepareStatement(lS_SQLStatement);

pstmt = this.setBindParams(pstmt);

int ii_position = 1;
//set timestamp of query; Take stamp before query as this is the most
conservative view

super.setSQLDateTimeStamp(new java.util.Date());
rs = pstmt.executeQuery();

While crossing the "pstmt.executeQuery()" it is throwing the above
exception.

It is very Urgent...If any body have any idea please let me know.

Thanks in advance,

Shanmugam.

--
Posted via http://dbforums.com

 
 
 

Urgent !!!! -- ORA-01008: not all variables bound

Post by Dave Miln » Wed, 22 Jan 2003 06:16:08


Bottom line - your query expects x parameters and you ain't
giving that many.

Debug through your setBinParams method.

Dave.


Quote:

> Hi All,
> In my application, at runtime, I am getting the following exception:

> Description: Class: FdpMbrDatesData Method: executeQuery() :
> SQLException
> java.sql.SQLException: ORA-01008: not all variables bound

> I am not able to guess what is the problem with the following portion
> of the code.

> pstmt = rO_conn.prepareStatement(lS_SQLStatement);

> pstmt = this.setBindParams(pstmt);

> int ii_position = 1;
> //set timestamp of query; Take stamp before query as this is the most
> conservative view

> super.setSQLDateTimeStamp(new java.util.Date());
> rs = pstmt.executeQuery();

> While crossing the "pstmt.executeQuery()" it is throwing the above
> exception.

> It is very Urgent...If any body have any idea please let me know.

> Thanks in advance,

> Shanmugam.

> --
> Posted via http://dbforums.com


 
 
 

1. OCI: Binding collections (varray), Ora 1008: not all variables bound

Hi,
I,ve got a stored procedure, which takes a varray as parameter:

create or replace type tp_person as object
(
        pid             number,
        name            varchar2(20),
        vorname         varchar2(20),
        strasse         varchar2(20),
        ort             varchar2(20),
);
/
create or replace type va_person AS varray(100) of tp_person;  
/
procedure list(person out va_person) is
begin
        select
                cast(multiset(
                        select value(tb)
                        from ov_person tb)
                        as va_person)
                into
                        person
                from
                        dual;
end;
/ (Thanks to T.Kyte)

Now I want to call this procedure from an OCI program:

static text *listStmtTxt = (text *) "BEGIN\
                                        pkg_person.list(:DATA);\
                                        END;";

OCIStmtPrepare(...)
OCIDefineByPos(...,(ub4)1,...)
OCIDescribeAny(...)
OCIAttrGet(..., (ub4) OCI_HTYPE_DESCRIBE,..., (ub4)OCI_ATTR_PARAM,...)
OCIAttrGet(..., (ub4) OCI_DTYPE_PARAM,... (ub4)OCI_ATTR_REF_TDO,...)
OCIObjectPin(...)

OCIDefineObject(...)
OCIDefineArrayOfStruct(...)

OCIStmtExecute(...) returns "Ora 1008: not all variables bound".

Who knows, what I forgot.
Does anybody have a chunk of sample code for this purpose?

TIA,
Joerg Blaese

2. Simple question about System DSNs (I hope)

3. ORA-01008: not all variables bound

4. Distribution transaction error

5. ORA-01008 not all variables bound ?

6. From File

7. Dynamic SQL return ORA : 1006 : Bind variable does not exist

8. Over flow problem.

9. ORA-01008: not all variables bound .

10. ORA-1008 : Not All variable Bound

11. ORA-01008: not all variables bound error in WebLOgic connection pooling

12. exp error: not all variables bound

13. Reading info from database to variables, not data bound controls