For Oracle 8i replace hostname, port_number and sid_name, userID and passwd
with the appropriate values and try this:

Connection conn =
DriverManager.getConnection
("jdbc:oracle:oci8:@(description=(address=(host=hostname)(protocol=tcp)(port
=port_number))(connect_data=(sid=sid_name)))", "user", "password");

��������������������
[EMAIL PROTECTED]
W: 813 282-8828
     1 800 280-8828 x1072
H: 727 669-8193





> -----Original Message-----
> From: C Ernenwein [SMTP:[EMAIL PROTECTED]]
> Sent: Saturday, July 01, 2000 10:10
> To:   [EMAIL PROTECTED]
> Subject:      Re: Oracl jdbc error
>
> We use this:
>
>        String oracleuser = "scott";
>     String oraclepwd = "tiger";
>     try {
>       Class.forName("oracle.jdbc.driver.OracleDriver");
>       con =
> DriverManager.getConnection("jdbc:oracle:thin:@192.61.5.57:1521:orcl",
> oracleuser, oraclepwd);
>     }
>     catch (ClassNotFoundException e) {
>       errorMsg = e.getMessage();
>     }
>     catch (SQLException e) {
>       errorMsg = e.getMessage();
>     }
>
> we also need to put the classes111.zip in the classpath
>
> Chris E
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of tonney
> Sent: Saturday, July 01, 2000 8:18 AM
> To: [EMAIL PROTECTED]
> Subject: Oracl jdbc error
>
>
> Dear all:
>    I encountered a problem when connecting to Oracle DB using jdbc-oci.
> The
> codes likes this:
> DriverManager.getConnection("jdbc:oracle:oci8:@mytnsname","scott","tiger")
> .
>  Every time it runs, I get a error: "
> java.lang.UnstaisfiedLinkError:ocijdbc8:file not found" .  But I can
> connect
> to this DB  using "Sqlplus scott/tiger@mytnsname". and The LD_LIBRARY_PATH
> has been set . Can somebody tell me why?
>
> Thanks very much for any help!
>
> Tonney.
>
> ==========================================================================
> =
> 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