|
||
|
|||
|
hello gentle man,
i used notepad as back end data base,i created csvdsn for that. type 1 jdbc driiver. the code i written is <code> import java.sql.*; import java.io.*; import sun.jdbc.odbc.*; class NotePadBackEnd { public static void main(String args[]){ int i=0; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("jdbc dbc:csvdsn" ,"","");String vsql="insert into csvdsn values(?,?)"; PreparedStatement pstmt=con.prepareStatement(vsql); pstmt.setInt(1,01); pstmt.setString(2,"first"); i=pstmt.executeUpdate(); }catch(Exception e){e.printStackTrace();} if(i==1) System.out.println("Record inserted"); else System.out.println("Record is not inserted"); } } </code> the error i am getting is microsoft jetty database driver not loaded. for loading driverclass i used rt.jar file,eventhough automatically comes in jre, i copied and set classpath for that. but error is not solved. what might be the reason?could plz explain me , how to solve this problem?
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| updating database | gurpreetm13 | JDBC & Databases | 3 | 09-10-2009 04:43 PM |
| Linking Database Projects in NetBeans | jcc285 | Java IDEs | 6 | 09-06-2009 08:23 AM |
| Desktop Database Application | TCoomer | JDBC & Databases | 2 | 04-06-2009 08:51 PM |
| struts & database for eclipse | kirman | Java IDEs | 2 | 17-10-2008 12:26 PM |
| Java with C++ Backend | richflores1 | Java Native Interface | 1 | 07-08-2008 07:09 AM |