2 Replies Latest reply on Jul 30, 2002 12:34 AM by sachin

    Invalid descriptor index

    sachin Newbie

      I am getting this ODBC SQL server Driver error (Invalid descriptor index ) when i am trying to call any of the get method in the entity bean. I am using jdbc odbc bridge to connect to my SQL server which is on another system. The method works fine if i call create method and then get the same bean object with findByPrimaryKey passing the same value which i have created by create method. In that case the get method works fine.
      But if i call get method without the create method, it gives the above method
      Does any knows why is this happening.?

        • 1. Re: Invalid descriptor index
          David Jencks Master

          As I understand the reports from people who have tried the jdbc-odbc bridge, you will continue to find an endless stream of such problems until you switch to a non jdbc-odbc driver.

          • 2. Re: Invalid descriptor index
            sachin Newbie

            Thanks for the suggestion. I will try to use another driver.
            But its not the problem with jdbc-odbc bridge.
            The problem was with ejb-jar.xml file.
            JBoss follows the pattern as below.
            The cmp field which u have declared as primary key field in <primary-field> tag of ejb-jar.xml file should be the last field in the list of <cmp-fields> tags.
            But i am not sure it is only for jdbc - odbc bridge or SQL server 7.0....
            Now my application is able to call all the finders and get methods.....