NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
rosejac12 Posted via mailing list.
|
Posted: Mon May 09, 2011 6:00 pm Post subject: Problem in viewing the added row in MS Access databse using statements? |
|
|
import java.sql.*;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:bful");
Statement st=con.createStatement();
String name="roseindia";
int age= 17;
int i=st.executeUpdate("insert into user1 (name1,age)
values('"+name+"','"+age+"')");
System.out.println("Row is added");
}
catch(Exception e){
System.out.println(e);
}
}
}
OUTPUT:
run:
Row is added
BUILD SUCCESSFUL (total time: 2 seconds)
The problem is am not getting the "added" row in the access database even
though the build is "successful". How do i get to see the row in the
databse?
Help plz
--
View this message in context: http://netbeans-org.1045718.n5.nabble.com/Problem-in-viewing-the-added-row-in-MS-Access-databse-using-statements-tp4382437p4382437.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|