TAILIEUCHUNG - Java Database Programming Bible- P10

Java Database Programming Bible- P10: Welcome to Java Database Programming Bible. This book is for readers who are already familiar with Java, and who want to know more about working with databases. The JDBC Application Programming Interface has made database programming an important aspect of Java development, particularly where Web applications are concerned. | Chapter i8 Using Rowsets to Display Data when the method is called. A RowSet is made updatable by setting its concurrency property to . Once you have an updatable RowSet you can insert a new row delete an existing row or modify one or more column values. Since requesting an updatable Rowset does not guarantee that you will actually get one you should check whether the Rowset is updatable by using . Listing 18-3 illustrates the use of the method to make a RowSet updatable and the use of to ensure that the RowSet actually is updatable. Listing 18-3 Making a RowSet updatable package import . import public class JDBCUpdatableRowSet public static void main String argv String url jdbc inetdae7 localhost 1433 database LEDES String login jod . String password jod try .newInstance JDBCRowSet rowSet new JDBCRowSet set url login and password url login password make the rowset scrollable and updatable set the sql command SELECT ID FName LName EMail FROM CONTACTS WHERE FName Ichabod execute the command -451- Team-Fly Please purchase PDF Split-Merge on to remove this watermark. Chapter i8 Using Rowsets to Display Data check whether the RowSet can be updated if Rowset is UPDATABLE else Rowset is READ_ONLY update the record and output it to the console while FName Igor for int j 1 j .getColumnCount j j t catch Exception e .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.