NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Problem in viewing the added row in MS Access databse using statements?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
rosejac12
Posted via mailing list.





PostPosted: Mon May 09, 2011 6:00 pm    Post subject: Problem in viewing the added row in MS Access databse using statements? Reply with quote

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 Smile



--
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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo