priya love

Greenhorn
+ Follow
since Aug 30, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by priya love

when I connect the jdbcodbc independently then its doing the business but when doing in swings it is giving driver not found though the DSN is Same
the code:
import java.sql.*;
class ot {
public static void main(String[] args)
{
try
{
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(Exception ClassNotFoundException)
{
System.out.println("Class Not Found Exception");
}
System.out.println("Trying to connect...");
try
{
Connection conn=DriverManager.getConnection("jdbc dbc:test","","");/test the dsn
Statement stmt=conn.createStatement();
ResultSet result;
System.out.println("Connected.");
String sql1 = "insert into empr(emp,add,zip) values ("+ 5 +","+ 7 +","+ 9 +")";
stmt.executeUpdate(sql1);
conn.close();

}
catch(SQLException sq)
{
System.out.println("SQL exception: " + sq.getMessage());
}
}
}
can anyone help me