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

Converting a DTS package from VB 6.0 to .NET

Status
Not open for further replies.

Aue

MIS
May 3, 2002
7
US
I post the same question, and I think I am in ther rihgt forum.

I am struggling with a couple of issues relate to the conversion from VB 6 to VB .NET. Specically it is relate Interface 'DTS.OLEDB Properties' cannot be indexes because it has no default property. I know where the problem is but I do not know how to fixed. The problem in the code is every time :

(oConnection.ConnectionProperties) shows up in the code

Here is the code:
Dim oConnection As DTS.Connection2


oConnection = goPackage.Connections.New("Microsoft.Jet.OLEDB.4.0")

oConnection.ConnectionProperties("Data Source").Value = “C:\UPLOADS.mdb"

oConnection.ConnectionProperties("Mode").Value = 1
oConnection.Name = "Connection 1"
oConnection.ID = 1
oConnection.Reusable = True
oConnection.ConnectImmediate = False
oConnection.DataSource = “C:\UPLOADS.mdb"
oConnection.ConnectionTimeout = 60
oConnection.UseTrustedConnection = False
oConnection.UseDSL = False
goPackage.Connections.Add(oConnection)


oConnection = goPackage.Connections.New("SQLOLEDB")
oConnection.ConnectionProperties("Integrated Security").Value = "SSPI"
oConnection.ConnectionProperties("Persist Security Info").Value = True
oConnection.ConnectionProperties("Initial Catalog").Value = "Test"
oConnection.ConnectionProperties("Data Source").Value = "TestServer"
oConnection.ConnectionProperties("Application Name").Value = "DTS Import/Export Wizard"
oConnection.Name = "Connection 2"
oConnection.ID = 2
oConnection.Reusable = True
oConnection.ConnectImmediate = False
oConnection.DataSource = "TestServer"
oConnection.ConnectionTimeout = 60
oConnection.Catalog = "Test"
oConnection.UseTrustedConnection = True
oConnection.UseDSL = False

goPackage.Connections.Add(oConnection)

thanks

 
I really need a answer, I appreacite your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top