Hi ,
This is a ODBC-JDBC specific error , I had got it once When The value
specified for the argument
ColumnNumber exceeded the maximum number of columns in the result set.


ALSO Some Info :

E10. SQLException: [S1002][Microsoft][ODBC SQL Server Driver] Invalid
Descriptor Index
This exception is usually thrown when retrieving a LONGVARCHAR or
LONGVARBINARY column using the getXXXStream() method (column size >
DefMaxFieldSize of idss.ini). This exception can be avoided by re-ordering
your SELECT statement so that the long column is place at the end of the
select list.

In the two examples below, assume that picture is the only LONGVARBINARY
type column. Then the first SELECT statement can cause this exception, while
the second one works fine:

(X) SELECT name, picture, address FROM employee
SELECT name, address, picture FROM employee

If there are two or more long columns in the same select list, place all of
them at the end of the select list and make sure that your JDBC program
retrieve them in the same order as they appear in the select list.


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Tarik Makota
Sent: Wednesday, August 09, 2000 11:06 AM
To: [EMAIL PROTECTED]
Subject: Re: DB Access problem


I changed odbc from CoffeePot to NorthWind (MSSQL 7.0)
I have DSN under System and can access it from PowerBuilder so it works.

This is the error i get when i run .jsp

java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor
Index



----- Original Message -----
From: Matthews,Paul <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 09, 2000 12:45 PM
Subject: Re: DB Access problem


> silly question- should that be 'CoffeePot' in the url?
>
> also call getConnection(url); rather than passing empty username/password
>
> regards, paul
>
> > -----Original Message-----
> > From: Tarik Makota [mailto:[EMAIL PROTECTED]]
> > Sent: 09 August 2000 17:37
> > To: [EMAIL PROTECTED]
> > Subject: DB Access problem
> >
> >
> > This is my acctual bean that is supposetly to connect to DB:
> > I put the 'markers' so that i know where it stops.
> >
> > As soon as it hits Connection conn = ... it stops
> > because in my jsp page print the propert userName
> > so that i know wher do i get stuck.
> > JSP page is displayed without any errors
> >
> >
> > My DSN  is ok because i have tried User and System.
> >
> >
> >
> > ----------------------------------------------------------
> > package foo;
> > import java.util.*;
> > import java.sql.*;
> > import java.net.URL.*;
> >
> >
> > public class DBLoginBean6{
> >  private boolean isValid = false;
> >  private String userName;
> >  private String userPassword;
> >
> >  public DBLoginBean6() {
> >      userName="Initalized";
> >      userPassword="";
> >      String url = "jdbc:odbc:CofeePot";
> >      String query = "SELECT * FROM EMPLOYEES";
> >      String firstName;
> >      String lastName;
> >      boolean more;
> >      try
> >      {
> >   userName="First Try";
> >         try{
> >         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> >   }
> >   catch (java.lang.ClassNotFoundException ex)
> >        {
> >           ex.printStackTrace();
> >       }
> >       userName=" connection begin";
> >         Connection con = DriverManager.getConnection(url,"","");
> >         userName="I connected";
> >         Statement stmt = con.createStatement();
> >   userName="i created statement";
> >         ResultSet rs = stmt.executeQuery(query);
> >         userName="i executed statement";
> >         while (more = rs.next())
> >         {
> >              firstName = rs.getString("FIRSTNAME");
> >              lastName = rs.getString("LASTNAME");
> >              System.out.println( firstName + " " + lastName);
> >              userName = "I was executed";
> >         }
> >   userName="I did while";
> >         rs.close();
> >         stmt.close();
> >         con.close();
> >         userName="And i ewxited";
> >      }
> >      catch (SQLException ex)
> >   {
> >       ex.printStackTrace();
> >      }
> >
> >
> >
> >  }
> >
> >  public String getuserName() {
> >        return userName;
> >  }
> >  public String getuserPassword() {
> >        return "I am user Password";
> >  }
> >
> >  }
> > ----------------------------
> >
> > ==============================================================
> > =============
> > To unsubscribe: mailto [EMAIL PROTECTED] with body:
> > "signoff JSP-INTEREST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to