亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? axlib.h

?? 一個(gè)非常好用的ADO封裝類,程序員不再需要跟煩人的COM接口打交道,寫數(shù)據(jù)庫程序不再麻煩!
?? H
?? 第 1 頁 / 共 3 頁
字號(hào):
/*------------------------------------------------------------------------ 
 dbAx class library - version 1.0.0
 Copyright (c) 2007-2008 Data Management Systems. 

 Description
 -----------
 The dxAx library consists of a set of C++ classes that wrap the
 Microsoft ActiveX Data Objects (ADO) interface allowing C++ 
 application developers to access databases in a native C++ environment.
 The objective of this library is to relieve the developer from the
 details of COM interfaces and having to translate VARIANT data types
 into common C++ data types.

 The dbAx library does not rely on MFC with the exception of the 
 CString and COleDateTime classes. Since the majority Windows
 applications are expected to utilize MFC, this is not seen as a
 real drawback. It is possibile, though, to develop non-MFC
 applications using this library since CString and COleDateTime are
 stand-alone and do not rely on any base class from the MFC library.

 Disclaimer
 ----------
 This software is provided 'AS IS', WITHOUT ANY WARRANTY, express
 or implied, as to MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 In no event shall the author be held liable for any damages arising
 from the use of this software.

 Any conflict with outside or third party entities regarding the naming
 convention used in this software, specifically 'dbAx', 'AxLib' or the
 prefix 'CAx' is unintended and purly coincidental.

 Data Management System reserves the right to modify and update this
 code without notice.

 License
 -------
 Permission is granted to anyone to use this software for any purpose,
 including commercial applications. You may alter this software to
 suite a particular purpose and redistribute it subject to the following
 conditions:

  1. You must not misrepresent the origin of this work claiming that
     you wrote the original software. Using this software in a project
     or product does not require that you acknowledge its use, but
     reference to it is certainly appreciated.

  2. If you alter this version of the software, it must be plainly marked
     as such and not misrepresented as being the original work.

  3. This notice and disclaimer may not be removed or altered from any
     source distribution of the product.

  Revision History
  ----------------
  v1.0.0  - 12/21/07
    Initial release.

  v1.0.1  - 2/10/2008
    Corrected fuction calls mixing 'BOOL' and 'bool' data types. VS2005
    produces errors since 'bool' is now an intrinsic data type. Also
    corrected errors in AxGen producing erroneous code.

  v1.1.0  - 2/25/08
    Numerious updates...
    
    .Rewrote a lot of code to avoid potentially calling invalid or
     NULL pointers.

    .Moved the 'Release' of underlying COM objects into the Destructor of
     class objects.

    .No longer necessary to call Create() prior to opening a CAxRecordset
     object provided no calls are made to methods affecting object settings
     or parameters prior to calling Open(). This is especially useful where
     temporary or ad-hoc recordsets are opened, closed and reopened using a
     new SQL query statement generated on the fly.

    .Revisited the FX_xxx functions to take into account the ADO flags
     adFldUpdatable and adFldUnknownUpdatable (see comment on 
     _isUpdatable()). Replaced the FX_Provider and SetVariant functions 
     with:
      
      HRESULT ::_setGetFieldValue(bool bSave, LPCTSTR lpszColumn,
                                  unsigned short varType, void* pvValue);

     This uses the helper function _getFldValue() or _setFldValue depending
     on the bSave flag. More testing done on all SQL data types to ensure
     correct translation. Client code, however, can still use the FX_xxx
     functions as always with the exception of FX_Money (see following
     comment).
    
    .Changed the data types for FX_Money and FX_SmallMoney to COleCurrency. 
     This MFC class encapsulates the CURRENCY struct and is better suited
     to handling monetary values as opposed to a double. Previous client
     code will need to be updated to handle the new data type.

    .Corrected the situation where an error was thrown if a match was not
     found for an ADOField specified in the DoFieldExchange method of a
     CAxRecordset object. This can occur if the derived class tags most or
     all of the fields in a table, however, a CAxCommand object
     (i.e. stored procedure) is used to return only a subset of the fields.
     The library generates the error code ERROR_INVALID_ACCESS, but does
     not consider it fatal.

    .Updated the AxGen utility to support the changes made in this version.
     When creating a user specified class for a CAxCommand object, AxGen
     matches the variant types in the derived class' _CreateParameters()
     method. AxGen substitutes '\' with '\\' when building a connection
     string so the C++ compiler recognizes the single delimiter.

    .Updated documentation as needed.

  v1.2.0  - 12/25/08
    .Added call to CursorLocation in the Open methods of CAxRecordset. This
     performs bounds checking and sets the CursorLocation for the Recordset
     based on the eCursorLocation parameter (per Dan via CodeProject).

    .Removed assumed values in the CAxRecordset::_getFldValue method. If the
     method failed, an assumed valued was used (i.e. 0). No assumption should
     be made, therefore the client application should initialize a recordset
     field variable before making a call to _getFldValue, directly or through
     one of the CAxRecordset::FX_{xxx} methods.

    .Moved call to CAxCommand::_CreateParameters to CAxCommand::Create(). 
     Deleted call to _CreateParameters in the CAxRecordset::Open method.
     This was necessary in the event that a CAxCommand object is used in a
     manner other than opening a recordset. For example, using a CAxCommand
     object to simply execute a stored procedure that does not involve
     returning table records (i.e. INSERT)

    .Added code to the CAxCommand::Execute method. A CAxCommand object can
     now be used to execute a stored procedure that may not involve a recordset.
     A typical case is accessing a stored procedure that does not involve a 
     SQL SELECT (i.e. INSERT)

    .Changed CAxRecordset::FX_TinyInt to use VT_UI1 (BYTE) rather than VT_I2
     (short). 

  How to use this library
  -----------------------
  1. Add the AxLib source files to your project. This includes:
      AxLib.h
      AxConnection.cpp
      AxCommand.cpp
      AxRecordset.cpp
      AxException.cpp

	2. Add "#include <AxLib.h> in the project's stdafx.h file.

  3. AxLib provides the GenGUIDStr function to support the generation
     of a unique GUID character string. A GUID string can be used with
     SQL Server's UniqueIdentifier field. If you need this functionality,
     un-remark the "#define GEN_GUID_STR" statement below. You will also 
     need to add a reference to Rpcrt4.lib in the project settings. This
     is found under:

         Project Settings/Linker Options/Input/Additional Dependencies

  4. Create an instance of the CAxConnection object.

  5. Create instance(s) of custom derived version of CAxCommand and CAxRecordset.

  6. Initialize the library at program startup using dbAx::Init()

  7. Open connection, command, and recordset objects as needed.

  8. At program terminstion, call the dbAx::Term() function to properly
     shut down the library.

  For a complete discussion on using the AxLib library, see the 
  accompanying documentation in the compiled help file - dbAx.chm
------------------------------------------------------------------------*/

#ifndef _AXLIB_H_
#define _AXLIB_H_

#include <icrsint.h>	  // ADO class extensions
#include <comdef.h>		  // COM support
#include <crtdbg.h>     // Debug _ASSERT support

//Redefine GUID macro to eliminate EXTERN_C
//ADO GUID interface delcaration (contained in adoid.h) are defined here, otherwise
//#else directive defines them as "extern "C" declarations
//NOTE: DEFINE_GUID macro in objbase.h includes the EXTERN_C statement which 
//      causes the compiler to choke on macro expansion during Link 
//      operations. Why??
#ifdef DEFINE_GUID
	#undef DEFINE_GUID
#endif

#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
        const GUID name = { l, w1, w2, { b1, b2,  b3,  b4,  b5,  b6,  b7,  b8 } }

// ******************************************************************************
//Un-Remark this define if you intended to use the
//global GenGUIDStr function. If so, you will need to
//add a reference to Rpcrt4.lib to the project settings.
//See note 3 in the "How to use this Library" section
//above.
//#define GEN_GUID_STR
// ******************************************************************************

#if _MSC_VER == 1200
  #include <afx.h>        // Support for CString VC6
  #include <afxdisp.h>    // Support for COleDateTime VC6
#else
  #include <atlstr.h>     // Support for CString
  #include <ATLComTime.h> // Support for COleDateTime
#endif

#include <adoid.h>      // ADO GUID's
#include <adoint.h>		  // ADO C++ header

#include <math.h>
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <tchar.h>			// Unicode
#include <vector>       // STL vector

using namespace std;

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
namespace dbAx {
  //AxLib errors.
  //Note: most error conditions use the AXLIB_ERROR_NONE enum and pull
  //      error information from the ADO COM interface.
  enum AxLibErrorEnums
  {
    AXLIB_ERROR_NONE = 0,
    AXLIB_ERROR_INIT = 5001,
    AXLIB_ERROR_DXBIND = 5002,
    AXLIB_ERROR_OBJECT_NOTOPEN = 5003,
    AXLIB_ERROR_BUF_SIZE = 5004,
    AXLIB_ERROR_NULL_PTR = 5005,
    AXLIB_ERROR_ENUM = 5006,
    AXLIB_ERROR_INVALID_POS = 5007,
  };

   //Header information prepended to binay data
   //field (i.e. image)
   typedef struct tagBINDATAINFOHEADER
    {
	    long		imgSize;	//uncompressed size
	    long		cmpSize;	//compressed size
	    long		lReserved1;	//Future
	    long		lReserved2; //Future
    } BINDATAINFOHEADER;


  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Classes defined in this header file

    class CAxConnection;
    class CAxCommand;
    class CAxRecordset;
    class CAxException;
    class CAxConnectionEvents;
    class CAxRecordsetEvents;
 
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Global namespace definitions and functions
  // AxLib Exception handling
  void ThrowAxException(int nAxError = AXLIB_ERROR_NONE, 
                         LPCTSTR lpszMsg = NULL,
                         HRESULT hr = S_OK);

  //Connection objects collection
  typedef std::vector<CAxConnection*> _AxConnectionsT;
  extern _AxConnectionsT m_AxConnections;

  //Initialization and Termination
  void Init();                                    //Initialize the library
  void Term();                                    //Terminate and cleanup
  void DropConnection(CAxConnection *pCn);

  //Utility functions
  const wchar_t*   M2W(LPCSTR lpszCharStr);       //char -> wchar
  const char*      W2M(LPCWSTR lpszWideCharStr);  //wchar -> char

#ifdef GEN_GUID_STR
  //The GenGUIDStr function will generate a string
  //version of a GUID that can be used with the SQL
  //Server UniqueIdentifier field.
  HRESULT          GenGUIDStr(CString& szGUID);
#endif


//Debug assert on ADO objects pointers
#ifdef _DEBUG
#define VALID_ADO_OBJECT(a) if(a == NULL) ThrowAxException(AXLIB_ERROR_NULL_PTR)
#else
#define VALID_ADO_OBJECT(a) 
#endif

  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // CAxConnection class
  // Desc: Open and maintain a connection to an OLEDB
  //       Data Provider. AxCommand and AxRecordset
  //       objects use an existing AxConnection object.
  class CAxConnection
  {
    friend class CAxException;
    friend class CAxRecordset;

    //Construction
    public:
    CAxConnection();
    CAxConnection(LPCTSTR lpszConnectStr);
    virtual ~CAxConnection();

    //Attributes
    public:

    protected:
    //CAxRecordset objects collection associated with
    //this connection object
    ADOConnection* m_piConnection;

    DWORD          m_dwEvents;               //Connection events cookie
    CString 			 m_strConnect;             //OLEDB Provider connection string

    //Implementation
    public:
    void           Create();

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区在线视频| 日韩一区二区不卡| 欧美一级专区免费大片| 亚洲精品国产视频| 成人手机电影网| 国产欧美中文在线| 国产精品一线二线三线精华| 日韩视频在线观看一区二区| 天天做天天摸天天爽国产一区| 欧美无人高清视频在线观看| 一区二区免费在线播放| www.亚洲免费av| 欧美激情一区二区在线| 国产宾馆实践打屁股91| 日本一区二区三区免费乱视频| 国产精品资源在线看| 国产欧美一区二区三区鸳鸯浴| 国产一区二区不卡| 久久久久久久久久久久久久久99| 国产一区二区三区在线观看免费 | 老司机精品视频导航| 欧美一区2区视频在线观看| 日韩精品一二区| 91精品国产91久久综合桃花| 免费观看日韩电影| 久久夜色精品国产噜噜av| 国产一级精品在线| 国产精品丝袜一区| 91蜜桃网址入口| 亚洲成人综合网站| 日韩视频在线一区二区| 国产精品1区二区.| 中文字幕在线观看一区| 91高清视频免费看| 日韩成人免费看| 久久精品亚洲乱码伦伦中文 | 国产在线视频一区二区三区| 精品国产乱码久久久久久老虎| 国产成人免费高清| 亚洲青青青在线视频| 69成人精品免费视频| 精品一区二区三区免费毛片爱 | 香港成人在线视频| 精品欧美一区二区三区精品久久 | 热久久久久久久| 久久久久久久久久看片| 91蜜桃免费观看视频| 奇米影视一区二区三区小说| 国产三级精品视频| 欧美视频一区在线| 国产激情一区二区三区桃花岛亚洲| 亚洲人成亚洲人成在线观看图片| 欧美浪妇xxxx高跟鞋交| 大胆亚洲人体视频| 日韩中文字幕麻豆| 国产精品另类一区| 欧美精品粉嫩高潮一区二区| 国产成人啪免费观看软件| 亚洲国产毛片aaaaa无费看| 久久久亚洲欧洲日产国码αv| 一本一道久久a久久精品 | 成人激情免费网站| 日韩黄色免费网站| 18涩涩午夜精品.www| 精品乱人伦小说| 在线视频一区二区三区| 国产美女视频91| 亚洲成人一区二区在线观看| 国产精品三级电影| 日韩色在线观看| 色婷婷综合久久久久中文一区二区| 久久av资源站| 亚洲gay无套男同| 亚洲欧美一区二区不卡| 国产午夜精品理论片a级大结局| 欧美日韩日日夜夜| 91天堂素人约啪| 国产成人综合自拍| 久久精品99久久久| 性感美女久久精品| 一区二区在线观看免费| 欧美国产精品久久| 久久久久久免费毛片精品| 欧美一级精品在线| 欧美专区亚洲专区| 91社区在线播放| 成人美女视频在线看| 精品一区二区三区视频在线观看| 亚洲h精品动漫在线观看| 一区二区三区在线播放| 国产精品久久久久一区| 国产欧美中文在线| 国产婷婷精品av在线| 欧美成人一区二区| 精品国产凹凸成av人网站| 91精品国产综合久久久久久漫画 | 蜜臀va亚洲va欧美va天堂| 亚洲电影激情视频网站| 玉米视频成人免费看| 亚洲视频一区二区免费在线观看| 中文字幕的久久| 国产精品麻豆视频| 18涩涩午夜精品.www| 亚洲欧洲成人av每日更新| 亚洲欧洲精品一区二区三区| 亚洲同性gay激情无套| 中文字幕人成不卡一区| 日韩美女精品在线| 亚洲精品欧美激情| 亚洲国产精品一区二区www在线 | 国产精品不卡在线| 国产精品少妇自拍| 亚洲色图制服丝袜| 一区二区三区成人| 亚洲小说春色综合另类电影| 天堂久久久久va久久久久| 日韩国产一二三区| 美女在线一区二区| 国产麻豆精品一区二区| 懂色av一区二区三区免费看| 成人性生交大合| 色综合久久久久久久久久久| 欧美性一二三区| 日韩欧美国产小视频| 国产日产欧美一区二区视频| 国产精品天干天干在观线| 亚洲三级久久久| 亚洲成a人v欧美综合天堂下载| 日本欧美一区二区在线观看| 国产毛片精品一区| 91首页免费视频| 欧美放荡的少妇| 26uuu亚洲综合色| 日韩毛片视频在线看| 丝袜国产日韩另类美女| 韩国理伦片一区二区三区在线播放| 国产成人小视频| 欧美影视一区在线| 精品成a人在线观看| 国产精品成人免费在线| 天天色图综合网| 国产精品1024| 欧美日韩国产一级| 国产免费久久精品| 亚洲第一二三四区| 国产老肥熟一区二区三区| 欧美性淫爽ww久久久久无| 亚洲精品一区二区三区四区高清 | 欧美一级一区二区| 国产精品成人免费精品自在线观看| 亚洲最新视频在线观看| 韩国女主播成人在线观看| 色婷婷综合久久久久中文一区二区 | 91毛片在线观看| 日韩一区二区三区精品视频| 亚洲国产精品精华液ab| 亚洲第一在线综合网站| 成人综合在线观看| 欧美一区二区三区四区五区| 国产精品你懂的在线欣赏| 婷婷亚洲久悠悠色悠在线播放 | 麻豆成人综合网| 99免费精品在线观看| 91精品国产福利| 亚洲精品成人少妇| 国产精品综合av一区二区国产馆| 欧美日韩亚洲综合一区二区三区| 久久久99精品免费观看不卡| 午夜国产不卡在线观看视频| 91论坛在线播放| 亚洲国产高清在线| 蜜桃在线一区二区三区| 91国内精品野花午夜精品| 欧美激情综合在线| 极品销魂美女一区二区三区| 欧美日韩一区 二区 三区 久久精品| 日本一区二区三区视频视频| 九九在线精品视频| 91精品欧美一区二区三区综合在 | 337p日本欧洲亚洲大胆精品| 亚洲成人综合网站| 91麻豆福利精品推荐| 中文字幕欧美国产| 韩国三级电影一区二区| 日韩一区二区三区免费看| 亚洲成人先锋电影| 欧美综合欧美视频| 一区二区三区四区中文字幕| 色婷婷精品大在线视频| 1区2区3区精品视频| 成人av在线观| 国产精品久线观看视频| 国产成人在线色| 久久久美女艺术照精彩视频福利播放| 美国十次综合导航| 日韩欧美高清dvd碟片| 麻豆视频一区二区| 精品电影一区二区三区| 国产一区二区三区视频在线播放| 精品欧美一区二区三区精品久久|