Article ID: 248241 - View products that this article applies to.
This article was previously published under Q248241
This article documents the steps necessary to enable SQL Server Distributed Management Objects (SQL-DMO) client side functionality without the need to install the SQL Server Client Utilities.
Typical ScenarioYou write an application that takes advantage of the SQL-DMO object model in SQL Server. Your application runs fine on the server computer itself, and it runs fine on client computers when the SQL Server Client Utilities are installed. However, by itself, the application does not run. Additionally, you may see several errors related to this as well. The most common errors are:
ActiveX can't create object
Field is not bound correctly
NOTE: Installing Microsoft Data Access Components (MDAC) does not resolve the problem.
Cannot find entry point
MDAC does not install the Sqldmo.dll file or any of the many dependent DLLs associated with the Sqldmo.dll file. What MDAC does include is many of the related DLLs that a SQL-DMO client connection uses. Regardless, bundling MDAC with your application installation is not going to be the most efficient answer either, because you do not need all of the MDAC DLLs to get your DMO connection to work. Also, MDAC installs many additional features that you will likely never use on your client computers. The main point here is that you do not need to install all of MDAC to get the functionality you want, just the necessary DLLs. The DLLs are covered later in this article.
Because different types of DLLs and where you need to place them are discussed, let's digress for a moment and briefly review Win32 and COM based DLLs. For the purposes of this article, all you need to know is how to tell them apart and then what to do with the DLLs once you identify them. With that in mind, here is what you need to know:
Following is the list of SQL-DMO related DLLs that you need to enable DMO from a client:
(server side location): c:\Mssql7\Binn\Resources\1033The Sqldmo.rll file always draws questions. An .rll file is a localized resource file. The resource directory varies based upon the national language configured on the SQL Server and client install. In this instance, directory 1033 is a decimal representation of the language identifier 0X0409, indicating U.S. English. After this .rll file is in place, you can register the Sqldmo.dll file by invoking the Regsvr32 utility. The command to register the file is:
(client side location): c:\Winnt\System32\Resources\1033
Upon successful registration, you should receive a message that states:
If you want to automate this registration into your application setup routine, refer to the various switches associated with the Regsvr32 utility. The command to register the file silently is:
DLLRegisterServer in SQLDMO.dll succeeded.
The directory that contains the Sqldmo.dll file must have a specific structure on the client computer; otherwise you may receive an error message similar to the following:
This error means that error 126 (expressed in decimal), which corresponds to a "specified module not found" error, occurred. In this instance, this relates to the Sqldmo.rll file. That is, the Regsvr32 utility finds the Sqldmo.dll file, but cannot complete its registration unless the Sqldmo.rll file is also available in the expected 1033 subdirectory.
GetLastError returns 0x0000007e
To avoid this, do the following:
Directory that contains Sqldmo.dll\Resources\1033And that 1033 directory should contain the Sqldmo.rll file.
In addition to the DLLs mentioned previously, you also want to make sure that you have the proper netlibrary DLLs installed. The main netlibrary DLLs you need here are:
After you complete the preceding steps, the client application should start without any of the initial problems caused by the absence of the necessary files.
Contact us for more help
Connect with Answer Desk for expert help.