I have the following code that just hangs I left it for 5 Minutes and
nothing had happen any ideas?
I left out the full url, usename and password of the connect for security
but its correct.
url is jdbc:oracle:thin:....;
DatabaseConnection dbc= new DatabaseConnection();
String str= "INSERT INTO Member(username, password, fname, sname, address,
phone) VALUES ('gdavie', 'a', 'glen', davie', 'home', '12345678')";
dbc.runUpdate(str);
code for runUpdate
public void runUpdate(String sql) throws SQLException
{
Statement statement = conn.createStatement();
statement.execute(sql);
}
schema
CREATE TABLE Member
(
username varchar(30) primary key,
password varchar(30),
fname varchar(30),
sname varchar(30),
address varchar(50),
phone varchar(10)
);
satish.kakumani@gmail.com - 16 May 2006 04:50 GMT
Try to ping the server if you can able to connect to the database
server....
Make sure you give the correct port as database server
test ping databaseserver from the command prompt..
dgfgrdg - 16 May 2006 04:53 GMT
The Database server works I can connect using sqlplus and the web interface.
Andy Flowers - 16 May 2006 18:54 GMT
> The Database server works I can connect using sqlplus and the web interface.
What happens if you run the same insert code from SQL*Plus ?
If this runs then it isolates the problem to the Java code, if not then it
isolates it to the database.
Are there any triggers associated with the table ?