SQLDMO Problem

I used “SQLDMO.dll” to take Sql Server Database Backup.
It worked fined.
But now that I have installed Sql Server 2008, I have the following error in my code Whenever I try to run it.

SQLDMO._SQLServer SQLServer = new SQLDMO.SQLServerClass();

{When I try to run In this line I see the following error}
[Retrieving the COM class factory for component with CLSID {10020200-E260-11CF-AE68-00AA004A34D5} failed due to the following error: 80040154.]

What should I do?


U need to register that dll on the server.

Go into cmd prompt and navigate to the bin folder or location the dll is on the disk. then type this and hit enter: regsvr32 SQLDMO.dll

It will popup saying success. U just click ok and try again. It should work after that

As I run the following command :

regsvr32 Interop.SQLDMO.dll

I have the following message.

Interop.SQLDMO.dll was loaded, but the DllRegisterServer entry point was not found.

This file can not be registered.

Blanking on the exact name of the library, but there is a native .NET SQL maintainence API that you should be using. SQLDMO is an old COM library that I think might no longer be supported.

You need to have the SQLDMO.dll on the server and register that. Not the Interop.SQLDMO.dll.