tags:

views:

49

answers:

1

Hi

Is there any way to use SQLSERVER SMO(sqlserver management Objects) in c++ other than Managed Code?

Help me in this regard...

I sincerely request dont give the comment as duplicate still i am not getting Clear answer

+3  A: 

As you pointed out. This question has already been asked without a satisfactory answer.

SMO is strictly manage code. The previous version, DMO, could be used in unmanaged code. If you need to use SMO, you have to use either C++/CLI or create wrappers for COM.

From the MSDN Documentation on SMO:

The SMO object model supersedes and replaces SQL-DMO. SMO supports SQL Server 2000, SQL Server 2005, and SQL Server 2008. It supports more SQL Server management tasks and contains many new features in SQL Server. SMO is designed to be more efficient and provide more control.

The DMO library is a COM object model, whereas SMO is implemented as a .NET Framework assembly. COM components are libraries that provide re-usable functionality to applications and in unmanaged application programming. The .NET Framework assemblies provide reusable functionality for the .NET Framework to write managed code applications.

During the transition to .NET Framework technology it is possible to have applications written partly in managed code and partly in unmanaged code. The .NET Framework lets you interface with COM components, which requires a Primary Interop Assembly. A runtime wrapper is required for SQL-DMO so that it can be called from a .NET Framework -based application.

Jose Basilio
Thanks jose Basilio for ur support.mow i am satisfied with ur support
Cute
Hi jose thanks for ur support
Cute