Sometimes it isn't possible to access a field of a resultset row two times.
Maybe somewhat like an internal buffer overflow. If your ResultSet contains
more than one row you maybe get the field of same name but next row. I have
this effect found sometimes on my own, and there was an explanation in JDK
documentation that it can lead to unpredictable results (depends on database
and/or row length), if you request the same field two times.
Solution: get your field contents in extra variable if you need them more
than one time.

ciao!
Kai Hackemesser

----- Original Message -----
From: Alp Güneysel <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 20, 2000 3:08 PM
Subject: can not get columntype of date


> this works
>         file://out.println("<a
> href=mailto:"+haberler.getString("strEmailAdr")+"
> TITLE="+haberler.getString("strEmailAdr")+">"+haberler.getString("strNam
> e") +" "+ haberler.getString("strLastName")+"</a><br>");
>         out.println(haberler.getDate("sdate")+"<br><br>");
>
> this also works
>         out.println("<a
> href=mailto:"+haberler.getString("strEmailAdr")+"
> TITLE="+haberler.getString("strEmailAdr")+">"+haberler.getString("strNam
> e") +" "+ haberler.getString("strLastName")+"</a><br>");
>         file://out.println(haberler.getDate("sdate")+"<br><br>");
>
> but when two lines run together, the first line executes succesfully,
> but the second line generates the following error:
> [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
>
> haberler("sdate") is of type datetime in sql server 2000 column.
> I use jdbc.odbc driver from sun.
>
>
> Thanks for any help.
> btw, this is my statement line:
> Statement statement =
> con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPD
> ATABLE);
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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