SQL-DMO Registry2 property 
Author Message
 SQL-DMO Registry2 property

hi Rulle,
like DBOptions2 and other new object "2", you can not directly cast the
creation as
Set o = New SQLDMO.Registry2
but you have to get them from the original "1" interface, the casting will
be done internally
Dim o As SQLDMO.Registry2
Set o = objectSqlServer.Registry
debug.print o.BackupDirectory
hth
Andrea Montanari

http://www.*-*-*.com/
(my vb6+sql-dmo little try to provide MS MSDE 1.0 a visual interface) ver
0.0.46
--------- remove DMO to reply



Quote:
> Hi!

> I want to read the backupdirectory path through SQL-DMO.
> The only way I've managed to find the "backupdirectory"
> property is by do a dim like this (see below). The
> creation of the object is not accepted by the
> compiler "invalid use of new keword". I thought it would
> be possible to use the backuodirectory through a
> SQLDMO.SQLServer2 object. What have I missed?

> 'Declared in general
> Dim o As SQLDMO.Registry2
> 'Sub code
> Set o = New SQLDMO.Registry2
> Text1.Text = o.BackupDirectory

> Have a good one!



Sat, 07 May 2005 18:52:10 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. SQL DMO AutostartServer property

2. Using Vbscript and SQL-DMO to connect to SQL Server and run a T-SQL script

3. SQL DMO (creating SQL Jobs/steps)

4. Using SQL-DMO to restore SQL databases

5. connect to sql server through sql-dmo

6. SQL DMO in VB-NET

7. SQL-DMO

8. Automation error (-2147217911) SQL-DMO / VB

9. SQL-DMO / VB6 Problem

10. SQL-DMO

11. SQL-DMO

12. Sql DMO (v7)

 

 
Powered by phpBB® Forum Software