jdbc problem

D

dgfgrdg

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:eek:racle: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)
);
 
S

satish.kakumani

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..
 
A

Andy Flowers

dgfgrdg said:
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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top