Dear,

As described in the documentation of JDBC, you use getConnection() as
follows:
Connection
conn=DriverManager.getConnection("jdbc:oracle:thin@**1**:**1a**:**1b**",
"**2**", "**3**");

**1** is the IP number or the name of the machine that hosts the database.
Try using the IP number as much as possible as it much faster compared to
using the host/machine name.  Using the machine name will make your program
look for the IP number of the machine.  So in the end, you might as well use
the IP address.

**1a** is the port number that you use to connect to the database server.
You're using the wrong port. The default port for any Oracle
database connection is 1521.

**1b** is the name of the database.

**2** is the username that you use to connect to the database.  The database
must recognize the username.  In other words, the username must be created
in
the database.  There are other alternatives for the username...you can use
your NT username...but for that to happen, you need to learn more Oracle
administration.

**3** is the password related to the above username.

Information on this is available in the JDBC docs and Oracle docs (how to
make
a JDBC connection).

Best regards,
Franky

-----Original Message-----
From: Yu, Meng [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 25, 2000 1:44 AM
To: [EMAIL PROTECTED]
Subject: JDBC OCI getConnection problem


Hi,

I want to use oci8 to connect my servlet to the database . My database is
Oracle 8i 8.1.5. The java vm is jdk1.2.2. And I downloaded Oracle8i
8.1.6.0.1 JDBC Drivers for use with JDK 1.2.x from oracle tech net. Compiles
ok. When running a test programm, register driver is ok, but getConnection
has following exception.
Exception: access violation (0xc0000005), Address: 0x6ee0fb83

I have spent a lot time on this. Anyone with oci experience please help. I
did install oracle client on servlet machine and it has no problem
connecting to dababase machine. thin driver works fine, sqlplus works fine.
I set path and classpath properly according to spec. Listner is running well
on database machine. Besides, I also open up all java security permission.
What else did I miss?

Thank you in advance for any of your advice.

-Meng

___________________________________________________________________________
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