SQL-DMO
Socpp
The Socpp sample illustrates using C++ as a development language for SQL-DMO applications.
Default Location
C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\sqldmo\cpp\socpp
Running the Sample
- Open the Socpp.dsw workspace.
- Run the application.
Remarks
The sample shows:
- How to create an instance of a SQL-DMO object.
- How to access a SQL-DMO object's member functions when using C++.
- Error handling in a C++ application.
The Socpp sample is a console application.
Build Configurations
Socpp.mak contains nmake configurations for IntelĀ®.
Build target | CFG parameter | Output directory |
---|---|---|
Intel x86 debug | "socpp - Win32 Debug" | Debug |
Intel x86 release | "socpp - Win32 Release" | Release |
Functions Illustrated
Application::GetName | SQLServer::Connect |
CoCreateInstance | SQLServer::GetApplication |
ErrorInfo::GetDescription | SQLServer::GetVersionMajor |
ErrorInfo::GetSource | SQLServer::GetVersionString |
GetErrorInfo | SQLServer::SetLoginTimeout |
Release | SysFreeString |