Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Distributing SQL-DEMO

0 views
Skip to first unread message

Adrian Forbes

unread,
Feb 23, 1999, 3:00:00 AM2/23/99
to
I've seen this question listed below with no real solution.

Does anyone know how to distribute SQL-DMO to a client? MSDN suggests
that registering SQLOLE65.DLL is enough, and that it also relies on
MSVCRT20.DLL and MSVCRT40.DLL. However I can't get this to work at all
on a non-development machine, even with those DLLs present.

On my machine (I have SQL Enterprise Manager installed which installs
SQL-DMO) I can register SQLOLE65.DLL fine. But on a non-dev machine any
attempt to register this DLL returns the 'could not find entry point' or
whatever the message is. I just can't get it working. The only way I
have got my app to work on a different machine is to install SQL
Enterprise Manager on that machine, then it works. For now this is
having to do, but as you can imagine it is not the best solution.

Does anyone out there know how to distribute SQL-DMO?


Gert Drapers

unread,
Feb 23, 1999, 3:00:00 AM2/23/99
to
MS KB article Q151862 and also look at Q134819

INF: Distribution of SQL-DMO (Distributed Database Objects)

The information in this article applies to: Microsoft SQL Server, versions
6.0 and 6.5

SUMMARY

The following article contains information on the files necessary to
distribute a SQL-DMO developed application.

MORE INFORMATION
The client will need a valid SQL Server connection license.

There are differences between the SQL-DMO versions 6.0 and 6.5. A client
cannot have both versions installed. The DLLs from 6.0 and 6.5 use the same
registry keys, making it impossible to have a multiple-version SQL-DMO
client.

You will need the following SQL-DMO components (the requirements for each
version are listed separately):

For SQL-DMO 6.0 you will need:

Client files:
..\SQL60\DLL\SQLOLE32.DLL : This is the DLL to support the SQL-DMO objects

..\SQL60\DLL\SQLOLE.REG : The registry components.

Server files:
..\SQL60\INSTALL\SQLOLE60.SQL: The stored procedures called by SQL-DMO

Installation:
The SQLOLE.REG file is installed using the Regedit.exe utility. This is not
the same Regedit shipped with Windows 95, but rather the 16 bit version. As
such it will require an 8.3 naming convention, or the processing will result
in an error with an invalid file name.

Use ISQL or similar utility to install the SQLOLE60.SQL. This should only
need to be done once at the SQL Server itself.


INF: Distribution of SQL-DMO (Distributed Database Objects)

The information in this article applies to: Microsoft SQL Server, versions
6.0 and 6.5

SUMMARY

The following article contains information on the files necessary to
distribute a SQL-DMO developed application.

MORE INFORMATION
The client will need a valid SQL Server connection license.

There are differences between the SQL-DMO versions 6.0 and 6.5. A client
cannot have both versions installed. The DLLs from 6.0 and 6.5 use the same
registry keys, making it impossible to have a multiple-version SQL-DMO
client.

You will need the following SQL-DMO components (the requirements for each
version are listed separately):

For SQL-DMO 6.0 you will need:

Client files:
..\SQL60\DLL\SQLOLE32.DLL : This is the DLL to support the SQL-DMO objects

..\SQL60\DLL\SQLOLE.REG : The registry components.

Server files:
..\SQL60\INSTALL\SQLOLE60.SQL: The stored procedures called by SQL-DMO

Installation:
The SQLOLE.REG file is installed using the Regedit.exe utility. This is not
the same Regedit shipped with Windows 95, but rather the 16 bit version. As
such it will require an 8.3 naming convention, or the processing will result
in an error with an invalid file name.

Use ISQL or similar utility to install the SQLOLE60.SQL. This should only
need to be done once at the SQL Server itself.

For SQL-DMO 6.5 you will need:
Client files:
..\MSSQL\BINN\SQLOLE65.DLL : The DLL to support the SQL-DMO objects.

SQLOLE65.DLL was written in Microsoft Visual C+/+ which is dependent on the
VC runtime Libraries:

MSVCRT20.DLL
MSVCRT40.DLL

These files are placed in the \Windows\System directory on Windows 95
computers and <system root>\System32 on Windows NT computers.

Server Files:

..\MSSQL\INSTALL\SQLOLE65.SQL - Stored procedures called by SQL-DMO

Installation:
To install the registry entries, run the following command:

REGSVR32.EXE SQLOLE65.DLL

This is the 6.5 equivalent to the REGEDIT used in the 6.0 installation
procedure.

Use ISQL or a similar utility to install the SQLOLE65.SQL. This should only
need to be done once at the SQL Server itself. This is compatible with the
SQL-DMO 6.0 procedures, so if you run this on a server you can still connect
to the server with 6.0 SQL-DMO clients.

For both versions:
You will need the appropriate DB-Library component (NTWDBLIB.DLL) and
Network Library (by default this would be DBNMPNTW.DLL).

You must also have the SQLSVC32.DLL file available and in the applications
search path.

When developing your application, be sure you develop on the appropriate
client. You need to make sure you are using the appropriate SQL-DMO (.tlb)
file and header files; otherwise, the application may not perform as
expected when you move it. For example, if Visual Basic (VB) cannot locate a
constant it uses zero (0). This will not be the correct value in most cases.

INF: Common SQL-DMO C/C++ Programming Issues
Article ID: Q134819
Last modified: April 30, 1997

The information in this article applies to:
Microsoft SQL Server, version 6.0

SUMMARY
This article provides information regarding some of the more common errors
you may encounter when you attempt to develop a Microsoft SQL Server version
6.0 distributed management objects (SQL-DMO) application.

MORE INFORMATION

Problem:
OUT OF MEMORY error returned from CoCreateInstance().

Cause:
You can encounter this error in a couple of ways. The first is an actual out
of memory situation. The second and more common is caused by a missing DLL
or invalid SQL-DMO environment.

Resolution:
Make sure you do not have a physical memory error. Also ensure that the
SQL-DMO environment was properly installed. You must have the SQLSVC32.DLL
and the SQLOLE32.DLL files available and in the applications search path.
You also need to have used the SQLOLE.REG file to properly register the
SQL-DMO objects.


Problem:
Ordinal 164 could not be located.

Cause:
An attempt is made to use a SQL-DMO application without the SQL Server
version 6.0 DBLIBRARY DLL file.

Resolution:
Install the SQL Server version 6.0 version of the DBLIBRARY, such as
NTWDBLIB.DLL.

Problem:
if(hResult) does not evaluate as expected

Cause:
S_OK is equal to zero, so statements such as the following can cause
unexpected behavior:

if(S_OK & hResult)
-OR-
if(hResult)

Resolution:
Since S_OK is equal to zero, it does not evaluate to a non-zero value, so it
evaluates to false and takes the else branch.

Change statements to look like the following:

if(S_OK == hResult)

Or, use the SUCCEED macro to check the status.


Problem:
CoInitialize() returns S_FALSE in an MFC application.

Cause:
By default, if you build an MFC project enabled for OLE support, the
AfxInitOle() function is called in the CWinApp derived class.

Resolution:
Continue to call the CoInitialize function. This will always ensure the
initialization has taken place. For instance if the CoUnInitialize()
function is invoked and you want to do another CoCreateInstance(), then you
must call the CoInitialize() the second time to reinitialize.


Problem:
Error C2039: 'xxx' : is not a member of 'IASQLOLEServer'

Cause:
The specific code line has attempted to directly access an object property.

Resolution:
Use the Set and Get methods to access the data.
pSQLServer->SetApplicationName("SQL_DMO Test");
pSQLServer->SetHostName("Sample");

-GertD
ge...@cohesion-software.com


Adrian Forbes

unread,
Feb 24, 1999, 3:00:00 AM2/24/99
to
Read it, done it.

The only thing that I may not have checked was that NTWDBLIB.DLL and
DBNMPNTW.DLL were present and OK. That could be it, unfortunately it'll
be a while before I need to do this again to see if that is the issue.
Thanks anyway.

0 new messages