Log in Register

Log in

How to store data into Database with out manually inserting values?

How to store data into Database with out manually inserting values?

 
0.0 (0)
430   0   0   0   0  
Write Review
Functional Area

To insert data into database using java , insert statement should be used in the code. But some changes to be made for storing data automatically.

Need to provide connection to mysql database. which can be done by the following.

          static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
          static final String DB_URL = "jdbc:mysql://localhost/jdbcdb";

          conn = DriverManager.getConnection("jdbc:mysql://localhost/jdbcdb", "root", "root");

For database see to that what action to be performed, if it is storing database you need to give insert into statement.

If it is retreive then Select statament.

User reviews

There are no user reviews for this listing.
Already have an account? or Create an account