Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query?

Status
Not open for further replies.

trungx

Programmer
Sep 20, 2001
28
VN
I want to update column NAME of table ExamDB using code below, but: No suitable drivererror appears. Help!
=================

Database database1 = new Database();
QueryDataSet queryDataSet1 = new QueryDataSet();
try
{
Connection connection=DriverManager.getConnection("jdbc:eek:dbc:ExamDB", "","");
Statement statement=connection.createStatement();

statement.executeUpdate("UPDATE ExamDB.Table1 SET NAME = 'name' ");

statement.close() ;
connection.close() ;
} catch (Exception ex){

System.out.println(ex);

}
 
Hey
use this first before opening up the connection
i.e before get connection.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Then try
Shyam

Shyam
 
Oh! I forgot it!. Thanks very much Shyamkumar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top