Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Creating the C++ OCI Helper Class

To use the XML APIs from C++, you must create a compatible context. In the case of a midtier or client application, you do this with the built-in xmlinit() method in the XMLParser class. However, in the case of working with the database, you need to call a method to initialize the OCI context along with the XML context. At the same time, you need to establish a database connection and submit your query in order to return the DOM of the XMLType you are interested in. You do all of this with the ociapi class specified in the previous header file, which has the following member functions:



init_env_handle() Creates and initializes and the OCI environment



connect_server() Creates a database connection and passes in the user ID and password



disconnect_server() Disconnects from the server, ending the session



cleanup() Cleans up the OCI environment



select_and_query() Submits the SQL/XML statement and returns the DOM of the



XMLType result while calling out to the DOM APIs to do the XPath query



query_xmlApi() Performs C++ XPath operations on XMLType and prints the result



The following sections examine the actual source code for the ociapi class implementation, broken down by its member functions.

/ 218