????? ??????? ???? SQL Server ????? OLE DB ? OLE DB ?? ODBC ?? Visual C++

?????? ????????? ?????? ?????????
??? ??????? ????? OLE DB ?? ????? ?????? SQL Server ? ??? ??????? ?????? ????? ????? ??? ???? ???? ????? ??? ???? ????.

?????? ??? ???? ???? ?????? ???? ???? ?? OLE DB ?????? ODBC ???? ?? 6.0 Visual C++ ? Msdasql.dll ? ????? ?? ??? ??????? ????? COLUMN_ENTRY_STATUS.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
?????? Microsoft Visual C++ .NET 2002 Microsoft Visual C++ .NET 2003 ???? ?? ?? ???? ????????? ???????? ??????? ???? ?? ??????? ?? ??? Microsoft .NET Framework ? ????? ????????? ???????? ??? ???????? Microsoft Windows ??????. ????? ????????? ??????? ?? ??? ??????? ??? ??? ????????? ???????? ??? ???????? Visual C++.????? Microsoft Visual C++ 2005 ??? ??????? ?????? ??? ??????? ?????? ??????? ?? ???? Microsoft .NET Framework ? ???? ????????? ???????? ??? ???????? ?????? Microsoft Windows.

?????

?????? ???? ???????? ??????? ?? ??????? ??????? MSDN:

  • VC ++ ????? COLUMN_ENTRY_STATUS
  • OLE DB ????? ???? ??????? "??????" ????? "DBSTATUS_S_IGNORE"

?????? ??? ????? ?? ?????????

???? ????? ????????? ???????? ?????? ????? ??????? ??? ??????? ??? ????? ???? ????? ??????? ???? ?? Visual C++ 6.0 OLE DB ???????? ?????:

??? ?????

   class CMyTableAccessor
   {
   public:
      LONG m_id;          // This is an identity column
      DWORD m_id_status;  // Status variable for id column
      TCHAR m_name[11];

   BEGIN_COLUMN_MAP(CMyTableAccessor)
     COLUMN_ENTRY_STATUS(1, m_id, m_id_status)
     COLUMN_ENTRY(2, m_name)
   END_COLUMN_MAP()

   ...
   };
				
?? ???? ??? ????? ??? ???? ??? ?????? ????????? ???????? ???????:
   CMyTable rs;

   rs.Open();
   rs.ClearRecord();  //Null out current structure

   strcpy(rs.m_name , "New Name");
   rs.m_id_status = DBSTATUS_S_IGNORE;  //Tells the provider to ignore this
                                        // column when updating.

   rs.Insert();  // Insert new record into the table letting server update
                // of the identity column.
   rs.Close();
				

??? ??? ??????

???? ???????: 194678
????? ??????: 24/???? ??????/1435
????? ???: Microsoft Visual C++ 2005 Express Edition, Microsoft Visual C++ .NET 2003 Standard Edition, Microsoft Visual C++ .NET 2002 Standard Edition, Microsoft Visual C++ 6.0 Enterprise Edition, Microsoft Visual C++ 6.0 Professional Edition, Microsoft Visual C++, 32-bit Learning Edition 6.0, Microsoft Data Access Components 2.5
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????194678

Get more support from smallbusiness.support.microsoft.com

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.