This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes problem in insering data in msaccess thru jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem in insering data in msaccess thru jdbc" Watch "problem in insering data in msaccess thru jdbc" New topic
Author

problem in insering data in msaccess thru jdbc

sukhesh raturi
Greenhorn

Joined: Jun 05, 2001
Posts: 1
friends when i use to insert data in database using execute update there is no problem ,but when i used prepared statement
to insert the same data in ms access its not working.Its funny that the programme is running on sql server without any problem
here is the code,please sort it out
few lines of code....

try
{
Connection con1=DriverManager.getConnection("jdbc dbc:sraturi");
PreparedStatement pst=con1.prepareStatement("INSERT INTO sr values(?,?,?)");
System.out.println("before update");
pst.setString(1,args[0]);
pst.setInt(2,Integer.parseInt(args[1]));
pst.setInt(3,Integer.parseInt(args[2]));

System.out.print("ok");
int r =pst.executeUpdate();
System.out.print("update completed" + r );

}
catch (Exception e)
{
System.out.println(" ");
}
}
}
thanx in advance
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: problem in insering data in msaccess thru jdbc
 
Similar Threads
Exception Null
how to convert .csv files into sql server files using java
Updaing image field in Sql server
Updating Access Db **Please Help**
Updation problem in JDBC