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

DTS Help

Status
Not open for further replies.

balajees

Programmer
Apr 24, 2002
12
US
Hi,

I need to transfer data from MsAccess to SQL Server using Visual Basic Programming (DTS References).

I came across many samples which showed transformation only between two sql server databases.

Can any help me.

Thanks in advance,
BALAJEE
 
You have a couple of options available.

One. set up the dts package on the server. You can then call the dts package from your vb code.

Heres a quick example

Dim objPackage As DTS.Package

Set objPackage = New DTS.Package

'--Load the package
objPackage.LoadFromSQLServer ServerName:="Server", ServerUserName:="DTSPackage", ServerPassword:="Password", PackageName:="Package"

'--Execute the Package
objPackage.Execute

Set objPackage = Nothing


Or if it has to be all vb code. create the package normally, then save it as a vb file. it will have all the code you need.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top