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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Connections in VB - Please help

Status
Not open for further replies.

Lftsk

Programmer
Jul 11, 2002
25
US
I am trying to connect to a SQL Server DTS package in VB

I have the following code

Dim oPackage As DTS.Package2

Dim objConnect As DTS.Connection2



Set oPackage = New DTS.Package2

Set objConnect = oPackage.Connections.New("SQLOLEDB")

With objConnect

.ID = 1
.DataSource = "MYSQLSERVER"
.UseTrustedConnection = True

End With

Set oPackage.Connections.Add = objConnect

'Note: I took this example right off
Microsoft's website.


However I'm being told that the ADD method requires
an argument. When I give it the required argument (the
connection object), I'm told that the object doesn't
support this property or method.

Any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top