Unale to get database connection (memory error) - odbc
801442Mar 31 2010 — edited Apr 1 2010Hi,
On my Windows XP system Oracle database is running. I have amse net configuration to access
remote oracle database in oracle using local name method.
Java JDK 1.6 is installed on my system . From C:> prompt I am able connect remote oracle
server usning connection string. That is sqlplus <user>/<passwd>@connection string.
I am able to get SQL prompt of remote database on my windows syste. I access data also using
SQL query.
Now I created a java program to connecte remote databasse server and compiled it successfully.
the code is given below.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import java.io.*;
import java.sql.*;
class be_enq extends JFrame
{
JFrame fr;
Connection con = null;
public be_enq()
{
fr = new JFrame();
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:odbc:orcl","scott","tiger");
System.out.println("Connection Established");
}
catch(Exception e){e.printStackTrace();}
}
public static void main (String[] args)
{
new be_enq();
}
}
Here orcl is the data source name created on windows XP.
while running the program, I am getting the message , " Connection established" followed by
The instruction at "0x627241fd" referenced memory at "0x03dc007a".
The memory could not be "read"
Can any one help me to get out of this problem.
I searched microsoft site and installed hotfix to rectify this problem. Still the result is same.
Thanx.