![]() SQL statements are executed and results are returned within the context of a connection.Ĭonnection object's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.Ĭonnection class represents a connection (session) with a specific database. Initially the cursor is positioned before the first row. ResultSet object maintains a cursor pointing to its current row of data. It is the basic service for managing a set of JDBC drivers.Ī table of data representing a database result set, which is usually generated by executing a statement that queries the database. ![]() ![]() By using this connection, we can create a statement object and this object will help us to execute the query.ĭriverManager is a class in java.sql package. What are the steps required to execute a query in JDBC?įirst we need to create an instance of a JDBC driver or load JDBC drivers, then we need to register this driver with DriverManager class. This driver is used to connect to the database.Ĥ. The JDBC Driver provides vendor-specific implementations of the abstract classes provided by the JDBC API. ![]() Read Also : Types of JDBC Driver explained with Example Each Database has it's own stored procedure language, With a JDBC technology-enabled driver, you can connect all corporate data even in a heterogeneous environmentĪ stored procedure is a set of statements/commands which reside in the database. JDBC technology is an API (included in both J2SE and J2EE releases) that provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |