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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? axlib.h

?? 一個非常好用的ADO封裝類,程序員不再需要跟煩人的COM接口打交道,寫數據庫程序不再麻煩!
?? H
?? 第 1 頁 / 共 3 頁
字號:
/*------------------------------------------------------------------------ 
 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();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久机这里只有精品| 在线电影院国产精品| 欧美伦理影视网| 日本一区二区三区四区 | 蜜臀av性久久久久蜜臀aⅴ| 国产电影一区在线| 欧美一区二区在线免费播放| 亚洲少妇30p| 国产91精品在线观看| 在线观看91av| 亚洲高清一区二区三区| av一区二区三区| 国产免费久久精品| 国产一区二区三区视频在线播放| 欧美女孩性生活视频| 亚洲精品中文在线影院| 成av人片一区二区| 国产精品嫩草99a| 国产黄色精品网站| 国产日韩成人精品| 国产麻豆成人传媒免费观看| 欧美一区午夜视频在线观看| 午夜精品福利一区二区三区av| 在线观看免费一区| 亚洲嫩草精品久久| 日本韩国一区二区| 亚洲综合男人的天堂| 日本韩国精品一区二区在线观看| 国产精品久久三区| 粗大黑人巨茎大战欧美成人| 国产欧美日韩精品在线| 国产成人小视频| 国产偷v国产偷v亚洲高清| 国产一区二区三区蝌蚪| 久久久久久久综合日本| 国产河南妇女毛片精品久久久| 久久久五月婷婷| 国产xxx精品视频大全| 国产精品久久久久aaaa樱花 | 欧美三级资源在线| 午夜私人影院久久久久| 制服丝袜在线91| 美女视频黄频大全不卡视频在线播放| 日韩三级在线免费观看| 久久精品av麻豆的观看方式| 亚洲精品在线免费观看视频| 国产一区二区视频在线播放| 国产嫩草影院久久久久| 91在线国产福利| 性感美女久久精品| 精品久久五月天| 国产·精品毛片| 亚洲女子a中天字幕| 欧美日韩国产综合一区二区| 麻豆国产欧美日韩综合精品二区| 精品福利视频一区二区三区| 成人免费视频caoporn| 亚洲精选视频免费看| 欧美老年两性高潮| 国产精品99久久久| 亚洲欧美另类久久久精品| 欧美日韩一二区| 国产一区二区伦理| 亚洲综合一区在线| 久久色中文字幕| 欧美三级一区二区| 国产成人亚洲综合色影视| 玉米视频成人免费看| 欧美电视剧在线观看完整版| 97精品电影院| 卡一卡二国产精品 | 午夜国产不卡在线观看视频| 精品国产乱码久久久久久图片| 97精品国产露脸对白| 久久国产生活片100| 日韩理论片在线| 日韩精品一区二区三区在线播放| 91免费在线播放| 九九九久久久精品| 亚洲一区二区中文在线| 国产欧美视频一区二区三区| 欧美日韩免费在线视频| 成人午夜免费电影| 激情六月婷婷久久| 亚洲成人1区2区| 自拍偷拍国产精品| 久久精品视频在线免费观看| 欧美日韩精品一区二区| 91亚洲国产成人精品一区二区三| 久久激情五月激情| 午夜久久久久久电影| 综合av第一页| 国产欧美一区二区精品婷婷| 日韩欧美国产综合一区| 欧美日韩精品一区二区| 欧美主播一区二区三区美女| av日韩在线网站| 粉嫩久久99精品久久久久久夜| 毛片不卡一区二区| 天堂va蜜桃一区二区三区漫画版| 亚洲天堂久久久久久久| 国产精品天美传媒沈樵| 久久精品人人做人人综合| 日韩精品一区二区三区在线观看| 欧美日韩三级一区二区| 欧美性色黄大片手机版| 在线免费精品视频| 色八戒一区二区三区| 99精品国产视频| 91老师片黄在线观看| 91在线视频免费91| 一本到三区不卡视频| 91久久国产最好的精华液| 99re在线精品| 97久久超碰国产精品电影| 91麻豆免费看片| 91免费观看视频| 欧洲一区在线电影| 欧美日韩五月天| 欧美精品99久久久**| 91精品国产91综合久久蜜臀| 日韩一级二级三级| 久久九九久久九九| 中文字幕一区二区三区蜜月 | 日韩高清不卡一区二区三区| 日韩福利视频导航| 国产一区二区三区高清播放| 国产精品2024| 99久久99久久精品国产片果冻| 91色porny蝌蚪| 欧美麻豆精品久久久久久| 日韩欧美国产不卡| 中文在线一区二区| 一区二区三区资源| 日韩经典中文字幕一区| 国产做a爰片久久毛片| kk眼镜猥琐国模调教系列一区二区 | 亚洲老司机在线| 视频一区在线播放| 夫妻av一区二区| 91国偷自产一区二区三区观看| 欧美老肥妇做.爰bbww视频| 日韩丝袜美女视频| 久久精品在线免费观看| 国产精品高潮呻吟| 丝袜美腿亚洲色图| 国产成人一级电影| 欧美日韩午夜在线视频| 久久免费精品国产久精品久久久久| 国产欧美视频一区二区| 亚洲高清久久久| 国产成人综合在线观看| 在线观看日韩高清av| 亚洲三级小视频| 青青草视频一区| va亚洲va日韩不卡在线观看| 91精品一区二区三区在线观看| 国产拍揄自揄精品视频麻豆| 亚洲国产欧美在线人成| 国产精品一区二区三区乱码| 欧美性猛片xxxx免费看久爱| 久久在线免费观看| 亚洲一区二区不卡免费| 国产成人精品三级麻豆| 欧美日韩视频在线一区二区| 中文字幕欧美激情| 精品一区二区三区香蕉蜜桃 | 国产成人在线色| 欧美精品自拍偷拍动漫精品| 国产精品高潮呻吟久久| 久久精品国产亚洲一区二区三区 | 欧美一区二区视频在线观看2022| 国产精品国产成人国产三级| 麻豆视频观看网址久久| 欧美色手机在线观看| 国产精品久久久久影院| 久久精品99国产精品| 欧美色倩网站大全免费| 最近中文字幕一区二区三区| 国产一区二区三区在线观看免费 | 91国产成人在线| 国产亚洲成年网址在线观看| 男人的天堂久久精品| 在线免费观看日本一区| 亚洲视频 欧洲视频| 懂色av一区二区夜夜嗨| 精品国产第一区二区三区观看体验 | 欧美国产成人精品| 精品一区二区三区免费观看| 欧美精品日韩综合在线| 亚洲一区二区欧美| 欧美色精品在线视频| 亚洲国产另类av| 欧美午夜精品一区二区蜜桃| 一区二区三区欧美久久| 欧美曰成人黄网| 亚洲第一福利一区| 欧美日韩夫妻久久| 午夜一区二区三区在线观看| 欧美私模裸体表演在线观看|