Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msde and sqldmo 1

Status
Not open for further replies.

ktighe

Programmer
May 25, 2001
45
US
I'm very new to vb (and sql, too) and I need to play around with the MSDE engine I just installed. Is anyone familiar with this? I need to register the active-x dmo control to use the MSDE engine, but I don't know how. I found the file 'sqldmo.dll' and registered it using regsvr, but the dmo control does not show up in list of available components in vb6. Can anyone help me with this (or just point me in the direction of a good resource for newbies...)? Any help would be greatly appreciated.

Kevin
 
You get the SQLDMO by installing the latest MDAC (ADO v2.6) off the Microsoft data access technology website (
Also, this is not a control (doesn't show up in the toolbox), it's a reference. Add it to your project under Project | References...

You would then write code like this to use it:
[tt]
Sub CreateTable()

Dim tbl As Table
Dim cat As ADOX.Catalog

Set cat = New ADOX.Catalog

' Open the Catalog.
cat.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\Program Files\Microsoft Office\" & _
"Office\Samples\Northwind.mdb;"

Set tbl = New Table
tbl.Name = "MyTable"
tbl.Columns.Append "Column1", adInteger
tbl.Columns.Append "Column2", adInteger
tbl.Columns.Append "Column3", adVarWChar, 50
cat.Tables.Append tbl

Set tbl = Nothing
Set cat = Nothing
End Sub
[/tt]

Hope this gets you started.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top