Recordset2.h
上传用户:yunnanyeer
上传日期:2007-01-03
资源大小:86k
文件大小:2k
源码类别:

数据库编程

开发平台:

Visual C++

  1. #if !defined(AFX_RECORDSET2_H__22061DAC_CE91_11D0_B332_0080C83612CB__INCLUDED_)
  2. #define AFX_RECORDSET2_H__22061DAC_CE91_11D0_B332_0080C83612CB__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // Recordset2.h : header file
  7. //
  8. #if defined(BUILD_RECORDSET_PATCH)
  9. #define EXTATTR __declspec(dllexport)
  10. #else
  11. #define EXTATTR __declspec(dllimport)
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CRecordset2 recordset
  15. class EXTATTR CRecordset2 : public CRecordset
  16. {
  17. public:
  18. CRecordset2(CDatabase* pDatabase = NULL);
  19. DECLARE_DYNAMIC(CRecordset2)
  20. // Field/Param Data
  21. //{{AFX_FIELD(CRecordset2, CRecordset)
  22. //}}AFX_FIELD
  23. // Overrides
  24. // ClassWizard generated virtual function overrides
  25. //{{AFX_VIRTUAL(CRecordset2)
  26. public:
  27. virtual void Move(long lRows, WORD wFetchType = SQL_FETCH_RELATIVE);
  28. //}}AFX_VIRTUAL
  29. // Implementation
  30. };
  31. namespace CRecordsetPatch // patches CString parameters to stored procedures
  32. {
  33. // To use this function(s) you need to put into DoFieldExchange function the following declaration
  34. // using CRecordsetPatch::RFX_Text;
  35. // This has to precede any call to RFX_Text
  36. // Failure in doing so will call the global RFX_Text instead
  37. EXTATTR void AFXAPI RFX_Text(CFieldExchange* pFX,LPCTSTR szName,
  38.  CString& value,int nMaxLength = 255,
  39.  int nColumnType = SQL_VARCHAR,short nScale = 0);
  40. };
  41. #define USES_RecordsetPatch using CRecordsetPatch::RFX_Text
  42. #if defined(_DEBUG)
  43. #pragma comment(lib,"RecordsetPatchD")
  44. #else
  45. #pragma comment(lib,"RecordsetPatch")
  46. #endif
  47. //{{AFX_INSERT_LOCATION}}
  48. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  49. #endif   // !defined(AFX_RECORDSET2_H__22061DAC_CE91_11D0_B332_0080C83612CB__INCLUDED_)