How to use SQL Server identity, OLE DB templates, and OLE DB for ODBC in Visual C++ (194678)
The information in this article applies to:
- Microsoft Visual C++ 2005 Express Edition
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Data Access Components 2.5
This article was previously published under Q194678 Note Microsoft Visual C++ .NET 2002 and Microsoft Visual C++ .NET 2003 support both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. The information in this article applies only to unmanaged Visual C++ code. Microsoft Visual C++ 2005 supports both the managed code model that is provided by the Microsoft .NET
Framework and the unmanaged native Microsoft Windows code model. SUMMARY When using the OLE DB Templates with a SQL Server database,
it is often necessary to add records to a table that contains an identity
column.
Getting an identity column to increment properly with the
OLE DB for ODBC provider that ships with Visual C++ 6.0, Msdasql.dll, requires
that the COLUMN_ENTRY_STATUS macro be used. REFERENCES Please see the following topics in MSDN online
documentation: - VC++ documentation for COLUMN_ENTRY_STATUS
- OLE DB Topic titled "Status" defines
"DBSTATUS_S_IGNORE"
Modification Type: | Major | Last Reviewed: | 1/11/2006 |
---|
Keywords: | kbConsumer kbDatabase kbhowto kbProvider KB194678 kbAudDeveloper |
---|
|