TAILIEUCHUNG - Oracle XSQL- P27

Oracle XSQL- P27Welcome to the exciting world of eXtended Structured Query Language (XSQL) development! What’s so exciting? Efficiency and ease of use. XSQL isn’t some razzle-dazzle technology to wow your users. It also isn’t the latest X standard du jour that no one can stop talking about until you ask, “But what does it do for me today?” The problem with all of the great stuff out there is that no one technology does it all. | 500 Chapter 18 public void handleAction Node result Document doc DocumentFragment queryActionFrag XSQLPageRequest pageRequest getPageRequest Element queryElem my-special-query Text queryStr SELECT name FROM product queryStr queryAction new XSQLQueryHandler pageRequest queryElem try queryActionFrag catch SQLException e reportError result queryActionFrag In this case you create the element named my-special-query and hard-code the SQL that you wish to pass. The result will be all of the names for all of the products. Since you don t use the action element at all you can invoke the action handler with the following simple XSQL xml version encoding UTF-8 xsql action handler NoXsqlQuery xmlns xsql urn oracle-xsql connection momnpup Hopefully this discussion has given you a firm grasp of the various ways that you can reuse the built-in action handlers within your own action handlers. The process is simple and flexible. You ve seen how to call multiple action handlers and even call action handlers that don t have their own element in the XSQL page. You ll see more use of built-in action handlers as the chapter progresses. JDBC Connections In the previous discussion you used built-in action handlers to work with this the database. This approach is very easy if you wish to attach the result to the datagram. It hides the complexities of JDBC entirely. But there are many good reasons that you Custom Action Handlers 501 might need to use JDBC directly. If you wish to use the results in an intermediate step prior to returning data then it may be easier to use a JDBC connection. This discussion examines the best way to do this. The following class uses the page s JDBC connection to execute a simple SQL statement. The connection is named in the XSQL page and is already part of the JDBC connection

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.