SQL DMO Programming

  • Hi All,

    We are using SQLDMO for creating the database and users in SQL Server. This is written in Visual Basic for SQL Server 7. When I tried to use this program in Windows 2000/SQL Server 2000, I got an error saying "You must upgrade your Enterprise Manager and SQL-DMO(SQLOLE) to SQL Server 2000(SQLDMO) to connect to this server". I have applied the SP3 for SQL Server and reapplied when I got this error first. But, still am getting this problem.

    The code piece is given below:

    Dim oSrv as SQLDMO.SQLServer

    Set oSrv = New SQLDMO.SQLServer

    oSrv.connect(Srvr,usr,pwd) ---getting the error here.

    I am referencing the SQLDMO.RLL available in winnt\system32\resources. Even when I pointed to the file in SQL Server folder, getting the same error.

    Thanks in advance.

    Thanks and regards,

    Sathya.

  • It is possible that your sqldmo.dll is for SQL 7?

    May be you can check the dll version or in object browser check if you can see the 2 classes (Backup2, Restore2, etc).

     

     

     

  • Hi,

    I could see the different classes as SQLServer and SQLServer2.  The dll version in system32 folder was older and I referenced the newer version which resides in SQL Server\Binn\80 folder.  But no luck.  This is a bit urgent and any help will be appreciated.

  • Try unregistering the DLL in system32 (regsvr32 /u <path\filename> ) and registering the correct one. (regsvr32.exe <full path to correct file> )

    HTH

    Dave


    http://glossopian.co.uk/
    "I don't know what I don't know."

  • Microsoft has a DLL help database which identifies all DLLs by version and applicability.  Check it out at http://support.microsoft.com/default.aspx?scid=/servicedesks/fileversion/dllinfo.asp&fp=1

     

     

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply