Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.9 KiB

  1. // net_bindings_get.h : Declaration of the net_businessEntity_bindingTemplates_get class
  2. #ifndef __NET_BINDINGS_GET_H_
  3. #define __NET_BINDINGS_GET_H_
  4. class net_businessEntity_bindingTemplates_getAccessor
  5. {
  6. public:
  7. LONG m_RETURNVALUE;
  8. TCHAR m_businessKey[ 50 ];
  9. TCHAR m_colbindingKey[ 50 ];
  10. TCHAR m_colserviceKey[ 50 ];
  11. TCHAR m_colURLType[451];
  12. TCHAR m_colaccessPoint[4001];
  13. TCHAR m_colhostingRedirector[ 50 ];
  14. CComBSTR m_connectionString;
  15. BEGIN_PARAM_MAP(net_businessEntity_bindingTemplates_getAccessor)
  16. SET_PARAM_TYPE(DBPARAMIO_OUTPUT)
  17. COLUMN_ENTRY(1, m_RETURNVALUE)
  18. SET_PARAM_TYPE(DBPARAMIO_INPUT)
  19. COLUMN_ENTRY(2, m_businessKey)
  20. END_PARAM_MAP()
  21. BEGIN_COLUMN_MAP(net_businessEntity_bindingTemplates_getAccessor)
  22. COLUMN_ENTRY(1, m_colbindingKey)
  23. COLUMN_ENTRY(2, m_colserviceKey)
  24. COLUMN_ENTRY(3, m_colURLType)
  25. COLUMN_ENTRY(4, m_colaccessPoint)
  26. COLUMN_ENTRY(5, m_colhostingRedirector)
  27. END_COLUMN_MAP()
  28. DEFINE_COMMAND(net_businessEntity_bindingTemplates_getAccessor, _T("{ ? = CALL dbo.net_businessEntity_bindingTemplates_get;1 (?) }"))
  29. // You may wish to call this function if you are inserting a record and wish to
  30. // initialize all the fields, if you are not going to explicitly set all of them.
  31. void ClearRecord()
  32. {
  33. memset(this, 0, sizeof(*this));
  34. }
  35. };
  36. class net_businessEntity_bindingTemplates_get : public CCommand<CAccessor<net_businessEntity_bindingTemplates_getAccessor>, CRowset, CMultipleResults >
  37. {
  38. public:
  39. HRESULT Open()
  40. {
  41. HRESULT hr;
  42. hr = OpenDataSource();
  43. if( FAILED(hr) )
  44. return hr;
  45. return OpenRowset();
  46. }
  47. HRESULT OpenDataSource()
  48. {
  49. HRESULT hr;
  50. CDataSource db;
  51. hr = db.OpenFromInitializationString( m_connectionString );
  52. if( FAILED(hr) )
  53. return hr;
  54. return m_session.Open(db);
  55. }
  56. HRESULT OpenRowset()
  57. {
  58. return __super::Open(m_session, NULL, NULL, 0, DBGUID_DBSQL, false);
  59. }
  60. CSession m_session;
  61. };
  62. #endif // __NET_BINDINGS_GET_H_