Creating and Executing JDBC Statements

Creating and Executing JDBC Statements We need to create a Statement object to send request and retrieve result from a database. The Connection object provide the createStatement ( ) method to create a Statement object. We can use the following code to create a Statement object: Connection con =DriverManager.getConnection (“jdbc:odbc:MyDSN”, “NewUser”, “NewPassword”); Statement stmt= con.createStatement ( ); We can use …

Creating and Executing JDBC Statements Read More »