Go Back   Java Programming Forums > Java Standard Edition Programming Help > JDBC & Databases


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21-10-2009, 06:48 AM
Junior Member
 

Join Date: Oct 2009
Posts: 19
Thanks: 1
Thanked 0 Times in 0 Posts
chinni is on a distinguished road
Default notepad as backend database

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("jdbcdbc: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?



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 02:07 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.