Try this out.............

try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con =
DriverManager.getConnection(jdbc:oracle:thin:@130.10.7.90:1521:orcl, "scott"
,"tiger");
Statement stmt = con.createStatement();
ResultSet rs =stmt.executeQuery(String query);
while(rs.next()) {
    String pass = rs.getString(1);
    int i = rs.getInt(2);

}
} catch(SQLException e) {}
stmt.close();
con.close();


> -----Original Message-----
> From: ananthakrishnan [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 24, 2001 3:43 PM
> To:   [EMAIL PROTECTED]
> Subject:      Help in Jdbcodbc bridge,dsn
>
>  hi,
>
>  I need help in the foll regards
>
> 1) I am using jdbcodbc bridge and want to connect to oracle database
> using a dsn.
>
> 2) With thin driver iam able to connect and am able to retrieve record
> sets
>
> 3) But with jdbc bridge I created a system dsn and tried to retrieve
> records and it says java has performed illegal operation.
>
> Is the problem due to something related to drivers or what.
> if possible send me a code snippet also for the same
>
> thanks in advance
> Anantha Krishnan
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to