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

SQLDMO

11 views
Skip to first unread message

Lee Taylor

unread,
Mar 24, 2001, 11:40:42 AM3/24/01
to
I am writing a VB.NET app that needs to reference the SQL Data Management COM
object (I don't think there is a .Net Version). I am able to add a reference to
the object, browse it with the object browser etc. When running the applicaiton I
get an error when I try to instantiate anything within the com module.

Error:
An Exception 'Unhandled Win32 Exception' has occurred in <application name>
However a debugger that cannot handle the exception type is already attached to
the process.

Code:
Private conDMO = New SQLDMO.SQLServer()

How can I get Access to the DMO com object. Note I could not find a tlb to use
the tlbimp utility.

Gert E.R. Drapers

unread,
Mar 25, 2001, 11:41:10 PM3/25/01
to
The typelib is embedded in SQLDMO.RLL if you use SQL Server 7.0m in
SQLDMO.DLL if you use SQL Server 2000.
-GertD

"Lee Taylor" <leet...@wltaylor.com> wrote in message
news:4a0901c0b481$2a79cc60$19ef2ecf@tkmsftngxa01...

Lee Taylor

unread,
Apr 3, 2001, 9:38:43 AM4/3/01
to
Since the tlb is in the DLL it should not be necessary to use the type lib import
utility to convert it to the necessary metadata. Or Is there. If the conversion
is not necessary, then I still have a problem not being able to use the DMO
library. If a conversion is necessary, then what utility if any would perform
this? The tlbimp program only works on type libraries, therfore, how would I get
the information converted.


.

Willy.D

unread,
Apr 3, 2001, 10:00:54 AM4/3/01
to
tlbimp generates an .NET compatible assembly out of the typelib info
contained in the COM DLL.
Try:
tlbimp sqldmo.dll /out:sqldmonet.dll
and refer to the generated dll in your .NET app's.

Willy.

"Lee Taylor" <leet...@wltaylor.com> wrote in message

news:856a01c0bc43$668273f0$19ef2ecf@tkmsftngxa01...

Gert E.R. Drapers

unread,
Apr 3, 2001, 1:26:32 PM4/3/01
to
This works for me, importing SQLDMO via VS or using TLBIMP32

using System;
using SQLDMO;
namespace Backup
{
/// <summary>
/// Summary description for App
/// </summary>
class App
{
static void Main(string[] args)
{
//
// TODO: Add code to start application here
//
__SQLServer server = new __SQLServer();
Databases databases;
_Database database;
Database db = new Database();
__Backup backup = new __Backup();
server.LoginSecure = true;
server.Connect("(local)\\dev", null, null);
Console.WriteLine("server {0}", server.Name);
databases = server.Databases;
database = databases.Item("pubs", null);
Console.WriteLine("database {0}", database.Name);
backup.Database = database.Name;
backup.Files = "c:\\pubs.bak";
backup._Backup2_SQLBackup(server);
server.DisConnect();
} // main
} // App
} // namespace

-GertD

"Willy.D" <willy.d...@pandora.be> wrote in message
news:#LUWBaEvAHA.1808@tkmsftngp02...

Willy.D

unread,
Apr 3, 2001, 1:46:14 PM4/3/01
to
What is tlbimp32?

Willy.

"Gert E.R. Drapers" <ge...@cohesion-software.com> wrote in message
news:ObGzDNGvAHA.1832@tkmsftngp05...

Gert E.R. Drapers

unread,
Apr 3, 2001, 7:59:51 PM4/3/01
to
Sorry should be tlbimp, confused with regsrv32 I guess.
-GertD

"Willy.D" <willy.d...@pandora.be> wrote in message

news:#ZaT9XGvAHA.1768@tkmsftngp05...

0 new messages