![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, Does anybody have any code samples/snippets (in VB) to create connections for the Source (an Acess database) and Destination (SQL 2000) Tables? I need to move data from Access to SQL. I've written an ActiveXScript for the data mapping/transformation. Since I intend to run everything from a stored procedure, I also need to create connections for the Source and Destination Records programatically. Any other hints/tips will be most welcome |
#3
| |||
| |||
|
|
Hello, Does anybody have any code samples/snippets (in VB) to create connections for the Source (an Acess database) and Destination (SQL 2000) Tables? I need to move data from Access to SQL. I've written an ActiveXScript for the data mapping/transformation. Since I intend to run everything from a stored procedure, I also need to create connections for the Source and Destination Records programatically. Any other hints/tips will be most welcome |
#4
| |||
| |||
|
|
Dim oConnection as DTS.Connection2 Set oConnection = goPackage.Connections.New("SQLOLEDB") oConnection.ConnectionProperties("Integrated Security") = "SSPI" oConnection.ConnectionProperties("Persist Security Info") = True oConnection.ConnectionProperties("Initial Catalog") = "AdventureWorks2000" oConnection.ConnectionProperties("Data Source") = "(local)" oConnection.ConnectionProperties("Application Name") = "DTS" oConnection.Name = "Microsoft OLE DB Provider for SQL Server" oConnection.ID = 1 oConnection.Reusable = True oConnection.ConnectImmediate = False oConnection.DataSource = "(local)" oConnection.ConnectionTimeout = 60 oConnection.Catalog = "AdventureWorks2000" oConnection.UseTrustedConnection = True oConnection.UseDSL = False goPackage.Connections.Add oConnection Set oConnection = Nothing you must Create Package Object firtst!! "sqluser" wrote: Hello, Does anybody have any code samples/snippets (in VB) to create connections for the Source (an Acess database) and Destination (SQL 2000) Tables? I need to move data from Access to SQL. I've written an ActiveXScript for the data mapping/transformation. Since I intend to run everything from a stored procedure, I also need to create connections for the Source and Destination Records programatically. Any other hints/tips will be most welcome |
![]() |
| Thread Tools | |
| Display Modes | |
| |