Loading ...
Sorry, an error occurred while loading the content.

Re: [xml-dbms] Filter parameter problem

Expand Messages
  • Ronald Bourret
    See: http://groups.yahoo.com/group/xml-dbms/message/2724 -- Ron
    Message 1 of 3 , Mar 10, 2003
    • 0 Attachment
      See:

      http://groups.yahoo.com/group/xml-dbms/message/2724

      -- Ron

      ruairi higgins wrote:
      >
      > When I pass in a vector of values I get the following error:
      >
      > java.lang.ArrayIndexOutOfBoundsException
      > at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter
      > (JdbcOdbcPreparedStatement.java:1026)
      > at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setInt
      > (JdbcOdbcPreparedStatement.java:520)
      > at org.xmlmiddleware.db.SPPreparedStatement.setInt
      > (SPPreparedStatement.java:166)
      > at
      > org.xmlmiddleware.xmldbms.datahandlers.Parameters.setParameter
      > (Parameters.java:138)Error null
      >
      > at
      > org.xmlmiddleware.xmldbms.datahandlers.Parameters.convertAndSetParamet
      > er(Parameters.java:318)
      > at
      > org.xmlmiddleware.xmldbms.datahandlers.Parameters.setParameter
      > (Parameters.java:233)
      > at
      > org.xmlmiddleware.xmldbms.datahandlers.Parameters.setParameters
      > (Parameters.java:89)
      > at
      > org.xmlmiddleware.xmldbms.datahandlers.DataHandlerBase.makeSelect
      > (DataHandlerBase.java:340)
      > at
      > org.xmlmiddleware.xmldbms.datahandlers.DataHandlerBase.select
      > (DataHandlerBase.java:289)
      > at org.xmlmiddleware.xmldbms.DBMSToDOM.retrieveRootTableData
      > (DBMSToDOM.java:332)
      > at org.xmlmiddleware.xmldbms.DBMSToDOM.retrieveDocument
      > (DBMSToDOM.java:271)
      > at org.xmlmiddleware.xmldbms.DBMSToDOM.retrieveDocument
      > (DBMSToDOM.java:185)
      > at xmldbmstest.TransferTest.main(TransferTest.java:102)
      >
      > here is were I set up my vector:
      >
      > Vector recordId = new Vector();
      > recordId.add("1");
      > recordId.add("2");
      > DBMSToDOM DbmsToDom = new DBMSToDOM(utils);
      > Hashtable params = new Hashtable();
      >
      > params.put("$RECORDID",recordId);
      >
      > here is a copy of my filter:
      >
      > <?xml version='1.0' ?>
      >
      > <!DOCTYPE FilterSet SYSTEM "filters.dtd" >
      >
      > <FilterSet Version="2.0"
      > xmlns="http://www.xmlmiddleware.org/xmldbms/filters/v2">
      > <Options>
      > <Wrapper Name="Subgroups" />
      > </Options>
      > <Filters>
      > <Filter>
      > <RootFilter>
      > <Table Name="SUBGROUP"/>
      > <Where Condition="RECORDID IN ($RECORDID) " />
      > </RootFilter>
      > </Filter>
      > </Filters>
      > </FilterSet>
      >
      > When I hard code in the values ie.<Where Condition="RECORDID IN
      > (1,2) " /> it returns the correct result. Any help would be greatly
      > appreciated.
    • ruairi higgins
      Thats working fine now. Thanks very much for all your help. Ruairi ... org.xmlmiddleware.xmldbms.datahandlers.Parameters.convertAndSetParamet ...
      Message 2 of 3 , Mar 11, 2003
      • 0 Attachment
        Thats working fine now. Thanks very much for all your help.

        Ruairi

        --- In xml-dbms@yahoogroups.com, Ronald Bourret <rpbourret@r...>
        wrote:
        > See:
        >
        > http://groups.yahoo.com/group/xml-dbms/message/2724
        >
        > -- Ron
        >
        > ruairi higgins wrote:
        > >
        > > When I pass in a vector of values I get the following error:
        > >
        > > java.lang.ArrayIndexOutOfBoundsException
        > > at sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter
        > > (JdbcOdbcPreparedStatement.java:1026)
        > > at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setInt
        > > (JdbcOdbcPreparedStatement.java:520)
        > > at org.xmlmiddleware.db.SPPreparedStatement.setInt
        > > (SPPreparedStatement.java:166)
        > > at
        > > org.xmlmiddleware.xmldbms.datahandlers.Parameters.setParameter
        > > (Parameters.java:138)Error null
        > >
        > > at
        > >
        org.xmlmiddleware.xmldbms.datahandlers.Parameters.convertAndSetParamet
        > > er(Parameters.java:318)
        > > at
        > > org.xmlmiddleware.xmldbms.datahandlers.Parameters.setParameter
        > > (Parameters.java:233)
        > > at
        > > org.xmlmiddleware.xmldbms.datahandlers.Parameters.setParameters
        > > (Parameters.java:89)
        > > at
        > > org.xmlmiddleware.xmldbms.datahandlers.DataHandlerBase.makeSelect
        > > (DataHandlerBase.java:340)
        > > at
        > > org.xmlmiddleware.xmldbms.datahandlers.DataHandlerBase.select
        > > (DataHandlerBase.java:289)
        > > at
        org.xmlmiddleware.xmldbms.DBMSToDOM.retrieveRootTableData
        > > (DBMSToDOM.java:332)
        > > at org.xmlmiddleware.xmldbms.DBMSToDOM.retrieveDocument
        > > (DBMSToDOM.java:271)
        > > at org.xmlmiddleware.xmldbms.DBMSToDOM.retrieveDocument
        > > (DBMSToDOM.java:185)
        > > at xmldbmstest.TransferTest.main(TransferTest.java:102)
        > >
        > > here is were I set up my vector:
        > >
        > > Vector recordId = new Vector();
        > > recordId.add("1");
        > > recordId.add("2");
        > > DBMSToDOM DbmsToDom = new DBMSToDOM(utils);
        > > Hashtable params = new Hashtable();
        > >
        > > params.put("$RECORDID",recordId);
        > >
        > > here is a copy of my filter:
        > >
        > > <?xml version='1.0' ?>
        > >
        > > <!DOCTYPE FilterSet SYSTEM "filters.dtd" >
        > >
        > > <FilterSet Version="2.0"
        > > xmlns="http://www.xmlmiddleware.org/xmldbms/filters/v2">
        > > <Options>
        > > <Wrapper Name="Subgroups" />
        > > </Options>
        > > <Filters>
        > > <Filter>
        > > <RootFilter>
        > > <Table Name="SUBGROUP"/>
        > > <Where Condition="RECORDID IN ($RECORDID) " />
        > > </RootFilter>
        > > </Filter>
        > > </Filters>
        > > </FilterSet>
        > >
        > > When I hard code in the values ie.<Where Condition="RECORDID IN
        > > (1,2) " /> it returns the correct result. Any help would be
        greatly
        > > appreciated.
      Your message has been successfully submitted and would be delivered to recipients shortly.