stdafx.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // stdafx.h : 标准系统包含文件的包含文件,
  2. // 或是经常使用但不常更改的
  3. // 特定于项目的包含文件
  4. #pragma once
  5. #ifndef VC_EXTRALEAN
  6. #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料
  7. #endif
  8. #include "targetver.h"
  9. #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的
  10. #include <afxwin.h> // MFC 核心组件和标准组件
  11. #include <afxext.h> // MFC 扩展
  12. #ifndef _AFX_NO_OLE_SUPPORT
  13. #include <afxole.h> // MFC OLE 类
  14. #include <afxodlgs.h> // MFC OLE 对话框类
  15. #include <afxdisp.h> // MFC 自动化类
  16. #endif // _AFX_NO_OLE_SUPPORT
  17. #ifndef _AFX_NO_DB_SUPPORT
  18. #include <afxdb.h> // MFC ODBC 数据库类
  19. #endif // _AFX_NO_DB_SUPPORT
  20. #ifndef _AFX_NO_DAO_SUPPORT
  21. #include <afxdao.h> // MFC DAO 数据库类
  22. #endif // _AFX_NO_DAO_SUPPORT
  23. #ifndef _AFX_NO_OLE_SUPPORT
  24. #include <afxdtctl.h> // MFC 对 Internet Explorer 4 公共控件的支持
  25. #endif
  26. #ifndef _AFX_NO_AFXCMN_SUPPORT
  27. #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
  28. #endif // _AFX_NO_AFXCMN_SUPPORT
  29. #include "table.pb.h"
  30. // Ado//由于MFC封装的ODBC不太好用;
  31. #import "C:\Program Files\Common Files\System\ado\msado15.dll" rename_namespace("ADOCG") rename("EOF", "adoEOF")
  32. //#import "..\ado\msado15.dll" rename_namespace("ADOCG") rename("EOF", "adoEOF")
  33. #pragma warning (default: 4146) // 微软建议不要理会这个错误;
  34. using namespace ADOCG;
  35. typedef struct __ADO__
  36. {
  37. _ConnectionPtr pConnection;
  38. _RecordsetPtr pRecordSet;
  39. _CommandPtr pCommand;
  40. //~__ADO__()
  41. //{
  42. // if (pCommand)
  43. // {
  44. // //pCommand->Close();
  45. // pCommand->Release();
  46. // }
  47. // if (pRecordSet)
  48. // {
  49. // pRecordSet->Close();
  50. // pRecordSet->Release();
  51. // }
  52. // if (pConnection)
  53. // {
  54. // pConnection->Close();
  55. // pConnection->Release();
  56. // }
  57. //}
  58. }AdoObj, *pAdoObj;