adspace


What is JDBC Connection? Explain steps to get Database connection in a simple java program.

Answer Posted / Gourab Kumar

"JDBC Connection represents an active channel for executing SQL statements against the database. To establish a connection in a simple Java program, follow these steps: 1. Load the JDBC driver, typically using Class.forName(). 2. Open a new connection using DriverManager.getConnection(), providing the URL, username, and password as parameters. 3. Use the Connection object to execute SQL statements or create other objects like Statements or PreparedStatements."n

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we return resultset in java?

990