methods for

It can not directly be created in code; instead, the Connection interface is created by the
Driver.connect() ...
This method creates a Statement object associated with this Connection session.
This method provides a PreparedStatement object to be associated with this Connection session.
•
•
boolean execute
(
String Sql
)

ResultSet executeQuery
(
String Sql
)

int executeUpdate
(
String Sql
)

1.

It allows us ...
Example: Select
Example: Insert
Example: Delete
•
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Java DataBase Connectivity - JDBC Part-2
Upcoming SlideShare
Loading in …5
×

Java DataBase Connectivity - JDBC Part-2

430 views

Published on

JDBC Part-2,
This was made by Prof. Chitrakant Banchhor
Very Descriptive,Easy to Understand
Thank You Sir......

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
430
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Java DataBase Connectivity - JDBC Part-2

  1. 1. methods for It can not directly be created in code; instead, the Connection interface is created by the Driver.connect() method.
  2. 2. This method creates a Statement object associated with this Connection session.
  3. 3. This method provides a PreparedStatement object to be associated with this Connection session.
  4. 4. • •
  5. 5. boolean execute ( String Sql ) ResultSet executeQuery ( String Sql ) int executeUpdate ( String Sql ) 1. It allows us to execute the Statement when we do not know if it is a query or an update. 2. It may return multiple results. 3. Use getResultSet to retrieve the ResultSet. Executes the SQL string and returns a single ResultSet object. Executes a SQL string, which must be an INSERT,UPDATE, DELETE, or a statement that doesn’t return anything.
  6. 6. Example: Select
  7. 7. Example: Insert
  8. 8. Example: Delete
  9. 9.

×