When acessing information from my SQLserver DB using JDBC, I noticed that I
must access the fields sequentially as they're defined in the DB. This is
very odd to me.
For instance, if the fields are sequentially defined as ID, NAME, and DATE
when defining the DB, then later when I attempt to access the dB I must
access that data in that order. If I first access Date and *then* attempt to
access NAME for instance, I will get an error.
Provided the code below - can anyone tell me what I need to do to allow
dynamic column surfing? This reminds me of a behavior that one would affect
when setting a cursor type in dealing with rows ... surely there must be a
similar something for columns (?).
Thanks.
Neal
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//DB DRIVER
String pUri = "jdbc:odbc:ICXX_LA";
//DSN DEFINITION
String pUid = "XX";
//UID
String pPwd = "XX";
//PWD
String pSql = "select * from tbl_qa_errors";
//SQL
Connection cn = DriverManager.getConnection(pUri,pUid,pPwd);
//Connection obj
Statement st = cn.createStatement();
//Statement Obj
ResultSet rs = st.executeQuery(pSql);
//RecordSet Obj
===========================================================================
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