锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美精品免费观看二区,99在线视频精品,国产精品入口夜色视频大尺度http://www.shnenglu.com/robinson119/category/4151.htmlUNIX/LINUX;ACE;SNMP;C++zh-cnSun, 25 May 2008 15:55:07 GMTSun, 25 May 2008 15:55:07 GMT60example1http://www.shnenglu.com/robinson119/archive/2007/08/20/30436.html瀹濇潐瀹濇潐Mon, 20 Aug 2007 09:01:00 GMThttp://www.shnenglu.com/robinson119/archive/2007/08/20/30436.htmlhttp://www.shnenglu.com/robinson119/comments/30436.htmlhttp://www.shnenglu.com/robinson119/archive/2007/08/20/30436.html#Feedback0http://www.shnenglu.com/robinson119/comments/commentRss/30436.htmlhttp://www.shnenglu.com/robinson119/services/trackbacks/30436.html#include <iostream>
using namespace std;
#include <stdio.h>

#define OTL_ORA7 // Compile OTL 3.1/OCI7
#include <otlv4.h> // include the OTL 4 header file

otl_connect db; // connect object

void insert()
// insert rows into table
{
 otl_stream o(50, // buffer size
              "insert into test_tab values(:f1<float>,:f2<char[31]>)",
                 // SQL statement
              db // connect object
             );
 char tmp[32];

 for(int i=1;i<=100;++i){
  sprintf(tmp,"Name%d",i);
  o<<(float)i<<tmp;
 }
}

void select()
{
 otl_stream i(50, // buffer size
              "select * from test_tab where f1>=:f<int> and f1<=:f*2",
                 // SELECT statement
              db // connect object
             );
   // create select stream
 
 float f1;
 char f2[31];

 i<<8; // assigning :f = 8
   // SELECT automatically executes when all input variables are
   // assigned. First portion of output rows is fetched to the buffer

 while(!i.eof()){ // while not end-of-data
  i>>f1>>f2;
  cout<<"f1="<<f1<<", f2="<<f2<<endl;
 }

 i<<4; // assigning :f = 4
   // SELECT automatically executes when all input variables are
   // assigned. First portion of output rows is fetched to the buffer

 while(!i.eof()){ // while not end-of-data
  i>>f1>>f2;
  cout<<"f1="<<f1<<", f2="<<f2<<endl;
 }

}

int main()
{
 otl_connect::otl_initialize(); // initialize OCI environment
 try{

  db.rlogon("scott/tiger"); // connect to Oracle

  otl_cursor::direct_exec
   (
    db,
    "drop table test_tab",
    otl_exception::disabled // disable OTL exceptions
   ); // drop table

  otl_cursor::direct_exec
   (
    db,
    "create table test_tab(f1 number, f2 varchar2(30))"
    );  // create table

  insert(); // insert records into table
  select(); // select records from table

 }

 catch(otl_exception& p){ // intercept OTL exceptions
  cerr<<p.msg<<endl; // print out error message
  cerr<<p.stm_text<<endl; // print out SQL that caused the error
  cerr<<p.var_info<<endl; // print out the variable that caused the error
 }

 db.logoff(); // disconnect from Oracle

 return 0;

}



瀹濇潐 2007-08-20 17:01 鍙戣〃璇勮
]]>
OTL 4.0, OTL concepthttp://www.shnenglu.com/robinson119/archive/2007/08/20/30435.html瀹濇潐瀹濇潐Mon, 20 Aug 2007 08:58:00 GMThttp://www.shnenglu.com/robinson119/archive/2007/08/20/30435.htmlhttp://www.shnenglu.com/robinson119/comments/30435.htmlhttp://www.shnenglu.com/robinson119/archive/2007/08/20/30435.html#Feedback0http://www.shnenglu.com/robinson119/comments/commentRss/30435.htmlhttp://www.shnenglu.com/robinson119/services/trackbacks/30435.htmlOTL stream concept

Any SQL statement, PL/SQL block or a stored procedure call is characterized by its input / output [variables].

Example 1. A SELECT statement has scalar input variables that are used in the WHERE clause of the statement. The SELECT statement also defines output columns. Potentially, the output columns are vector parameters since the SELECT statement may return multiple rows.

Example 2. An INSERT statement writes data into a table, i.e. it has input parameters. Same is true for UPDATE statemements.

Example 3. A DELETE statement deletes rows from a table. Deletion criteria needs to be entered, thus the DELETE statement has input.

Example 4. A stored procedure may have input and/or output parameters. Usually, stored procedure parameters are scalars. There is a special case, though: stored procedure returning a referenced cursor (Oracle) or a result set (MS SQL Server or Sybase).

Example 5. An arbitrary PL/SQL block may have input or/and output parameters that may be either scalars or vectors.

Industrial strength database servers have bulk (or array) operations:

  • bulk INSERT
  • bulk UPDATE
  • bulk DELETE
  • bulk SELECT

Therefore, parameters in INSERT/UPDATE/DELETE statement may be vectors if the statement is performed in bulk.

The picture is clear: any interaction with SQL or its procedural extension can be treated as a black box with input and/or output. It does not matter what the black box does inside (according to the definition of a black box). What matters is the input wires that send signals into the box and the output wires that receive signals from the box:

Some of the wires may be both input and output.

Why not combine the concept of data streams and SQL? Instead of multiplying constructs and making database API's too convoluted, why not unify and simplify them? The OTL gives an answer to those questions and the answer is the otl_stream class.

Since a SQL statement may be done in bulk, the otl_stream is a buffered stream. Conceptually, the otl_stream has two separate buffers: input and output. The input buffer is comprised of all input variables put together. Respectively, the output buffer is comprised of all output variables put together.

C++ streams are usually manipulated via operator >> and operator <<. The stream reference is on the left of the operator symbol:

   s>>variable;
s<<variable;

The double arrow shows the direction in which data goes:

  • >> -- from the stream into the data container (variable)
  • << -- from the data container (variable) into the stream

OTL streams are similar to buffered C++ streams . A SQL statement or stored procedure call is opened as an ordinary buffered stream. The logic of the OTL stream operations remains the same as the C++ stream operations with the only exception -- the OTL stream has separate input and output buffers which may overlap.

The OTL stream has a flush function for flushing its input buffer when the buffer gets full and a collection of >> and << operators for reading and writing objects of different data types. The most important advantage of the OTL streams is their unified interface to SQL statements and stored procedure call of any kind. This means that the application developer needs to remember just a few syntactical constructs and function names which he already got familiar with when he started working with C++ streams.

Inside the OTL stream there is a small parser for parsing declarations of bind variables and their data types. There is no need to declare C/C++ host variables and bind them with placeholders by special bind function calls. All necessary buffers are created dynamically inside the stream. The stream just needs to be opened for reading and writing values.

The OTL stream interface requires use of the OTL exceptions. This means that potentially any OTL stream operation can throw an exception of the otl_exception type. In order to intercept the exception and prevent the program from aborting, wrap up the OTL stream code with the corresponding try & catch block.

The functioning of the otl_stream is pretty much automatic: when all of the input variables of the stream are defined (in other words, the input buffer is filled out), it triggers the block box inside the stream to execute. The output buffer gets filled out in the process of the execution of the black box. After the execution is finished, the output values can be read from the stream. If it is a SELECT statement and it returns more rows than the output buffer can hold, after the whole output buffer is read, then the stream automatically fetches the next bacth of rows into the output buffer.



瀹濇潐 2007-08-20 16:58 鍙戣〃璇勮
]]>
OTL 4.0, Introductionhttp://www.shnenglu.com/robinson119/archive/2007/08/20/30434.html瀹濇潐瀹濇潐Mon, 20 Aug 2007 08:55:00 GMThttp://www.shnenglu.com/robinson119/archive/2007/08/20/30434.htmlhttp://www.shnenglu.com/robinson119/comments/30434.htmlhttp://www.shnenglu.com/robinson119/archive/2007/08/20/30434.html#Feedback0http://www.shnenglu.com/robinson119/comments/commentRss/30434.htmlhttp://www.shnenglu.com/robinson119/services/trackbacks/30434.htmlIntroduction This document describes the Oracle, Odbc and DB2-CLI Template Library, Version 4.0 (OTL 4.0). OTL 4.0 is a C++ library based on templates. It integrates all of the previous releases into one library.

OTL 4.0 was designed as a combination of a C++ template framework and OTL-adapters. The framework is a generic implementation of the concept of OTL streams. The OTL-adapters are thin wrappers around the database APIs and are used as class type parameters to be substituted into the template framework.

OTL 4.0 covers the functionality of a whole database API with just a handful of concrete classes: otl_stream, otl_connect, otl_exception, otl_long_string, and several template PL/SQL (Oracle) table container classes, generated from the template framework and the OTL-adapters.

The OTL code gets expanded into direct database API function calls, so it provides ultimate performance, reliability and thread safety in multi-processor environments as well as traditional batch programs. OTL 4.0, being a template library, is highly portable since it is self-sufficient and compact enough.

OTL 4.0 is ANSI C++ compliant (ANSI C++ typecasts, clean templatized code, etc.), tightly integrated with the Standard Template Library (STL) via so-called STL-compliant stream iterators, and natively supports the STL std::string's in otl_stream's.

The current version of the OTL supports Oracle 7 (natively via OCI7), Oracle 8 (natively via OCI8), Oracle 8i (natively via OCI8i), Oracle 9i (natively via OCI9i), Oracle 10g (natively via OCI10g), DB2 (natively via DB2 CLI), ODBC 3.x as well as ODBC 2.5 compliant data sources in MS Windows and Unix (e.g. Oracle, MS SQL Server, Sybase, Informix, MySQL, DB2, Interbase / Firebird, PostgreSQL, SQLite, SAP/DB, TimesTen, MS ACCESS, etc.). The list of supported database backends is constantly growing.



瀹濇潐 2007-08-20 16:55 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            91久久久亚洲精品| 一本色道久久综合亚洲精品婷婷 | 国产精品亚洲аv天堂网| 99视频超级精品| 亚洲精品色婷婷福利天堂| 欧美日韩精品欧美日韩精品| 亚洲视频在线观看一区| 亚洲午夜电影| 国产一区二区在线观看免费| 另类图片综合电影| 欧美大片第1页| 亚洲婷婷国产精品电影人久久| 亚洲婷婷国产精品电影人久久| 国产欧美日韩中文字幕在线| 麻豆精品91| 欧美另类99xxxxx| 午夜久久影院| 另类成人小视频在线| 日韩视频一区二区在线观看 | 国产资源精品在线观看| 久久久美女艺术照精彩视频福利播放 | 久久婷婷蜜乳一本欲蜜臀| 久久中文字幕导航| 亚洲人www| 亚洲欧美日韩国产成人精品影院| 黄色成人片子| 99精品欧美一区二区三区综合在线| 国产精品亚洲一区二区三区在线| 久久久亚洲人| 欧美日韩妖精视频| 久久中文字幕一区二区三区| 欧美日韩高清在线| 久久久久久亚洲综合影院红桃| 欧美寡妇偷汉性猛交| 欧美伊人久久久久久午夜久久久久| 久久久噜噜噜久久人人看| 在线亚洲高清视频| 久久综合电影| 欧美在线首页| 欧美性一区二区| 亚洲高清久久网| 国产一区91| 中文在线资源观看视频网站免费不卡| 在线观看日韩av电影| 亚洲欧美激情四射在线日| 9i看片成人免费高清| 久久免费视频网站| 欧美在线亚洲| 国产精品免费观看在线| 亚洲精品日本| 亚洲精品在线免费| 久久综合网络一区二区| 久久久久久久久久看片| 国产精品久久久久一区二区三区共 | 亚洲永久网站| 亚洲午夜久久久久久尤物| 美女视频黄 久久| 久久久久久久999精品视频| 国产精品久久久一区麻豆最新章节| 亚洲福利电影| 亚洲人成人77777线观看| 久久久蜜臀国产一区二区| 久久乐国产精品| 激情伊人五月天久久综合| 久久成人精品无人区| 久久久久一区二区| 国产亚洲精品7777| 欧美在线视频一区| 久久美女艺术照精彩视频福利播放| 国产麻豆综合| 欧美影院一区| 久久蜜桃香蕉精品一区二区三区| 国产亚洲一区在线| 久久国产精品高清| 免费观看一级特黄欧美大片| 在线日本欧美| 噜噜噜久久亚洲精品国产品小说| 女女同性女同一区二区三区91| 在线观看福利一区| 你懂的亚洲视频| 亚洲精品免费一区二区三区| 在线视频亚洲欧美| 国产精品国产三级欧美二区| 亚洲免费在线视频| 久久久久久久综合日本| 在线看成人片| 欧美日韩精品免费在线观看视频| 一区二区日本视频| 欧美在线观看视频| 在线观看亚洲一区| 欧美肥婆bbw| 亚洲午夜精品久久| 久久综合色婷婷| 99re6热只有精品免费观看 | 欧美精品七区| 亚洲亚洲精品在线观看| 久久久久欧美| 亚洲巨乳在线| 国产区欧美区日韩区| 久久综合色8888| 99天天综合性| 麻豆精品视频在线观看| 国产精品99久久久久久www| 国产午夜亚洲精品理论片色戒| 久久亚洲视频| 一区二区三区欧美成人| 久久露脸国产精品| 亚洲午夜免费视频| 一区二区三区在线视频免费观看| 欧美日产国产成人免费图片| 香蕉久久夜色精品| 亚洲精一区二区三区| 久久天堂av综合合色| 亚洲视频一区二区| 在线精品观看| 国产精品系列在线| 欧美国产1区2区| 久久久亚洲人| 亚洲欧美日韩一区二区在线| 亚洲高清自拍| 久久综合久久综合久久| 亚洲午夜性刺激影院| 亚洲国产精品视频| 国产午夜精品全部视频在线播放| 欧美日韩亚洲一区三区| 欧美成人中文字幕| 久久免费的精品国产v∧| 性欧美超级视频| 亚洲小说欧美另类婷婷| 亚洲日本国产| 亚洲欧洲另类国产综合| 欧美福利在线观看| 91久久线看在观草草青青| 国产精品乱码妇女bbbb| 99精品视频免费观看视频| 欧美成人午夜77777| 久久久久一本一区二区青青蜜月| 亚洲影院免费| 亚洲一区二区三区高清不卡| 99re6热在线精品视频播放速度| 亚洲高清一区二区三区| 在线不卡免费欧美| 国产主播一区二区| 国产在线精品二区| 一色屋精品视频在线看| 狠狠爱www人成狠狠爱综合网| 国产啪精品视频| 国产日韩欧美亚洲一区| 国产亚洲欧美另类中文| 国产日韩一级二级三级| 久久天天躁狠狠躁夜夜爽蜜月| 亚洲精品视频在线看| 亚洲在线观看| 在线观看日韩av电影| 亚洲一区免费在线观看| 99精品久久免费看蜜臀剧情介绍| 午夜精品一区二区三区在线视 | 久久中文欧美| 香蕉久久夜色精品国产使用方法| 亚洲视频视频在线| 亚洲欧美日韩视频二区| 欧美一区二区三区的| 久久精品国产99精品国产亚洲性色| 欧美一区二区三区成人| 久久综合影视| 欧美精品日韩综合在线| 欧美日韩蜜桃| 国产免费成人在线视频| 影音先锋亚洲电影| 亚洲理伦在线| 欧美亚洲综合久久| 美乳少妇欧美精品| 亚洲精品免费一区二区三区| 亚洲午夜精品一区二区| 欧美一区日韩一区| 欧美国产日产韩国视频| 国产精品一区=区| 亚洲高清视频中文字幕| 亚洲午夜电影网| 久久一区中文字幕| 亚洲乱码视频| 久久er99精品| 欧美日韩精品一区二区在线播放 | 欧美精品亚洲一区二区在线播放| 欧美激情亚洲另类| 国产精品私房写真福利视频 | 国产欧美一区二区三区久久人妖| 永久91嫩草亚洲精品人人| 艳妇臀荡乳欲伦亚洲一区| 欧美在线免费播放| 91久久精品国产91久久| 性欧美大战久久久久久久免费观看 | 久久久91精品国产一区二区三区| 另类天堂视频在线观看| 国产精品久久久久久久久婷婷| 伊人色综合久久天天| 午夜精品一区二区三区电影天堂 | 先锋影音国产精品| 亚洲激情影院| 久久另类ts人妖一区二区|