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!

Import Access..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
SE
Hi all,

I have a DTS-script that looks like:
Function Main()
Dim oConn

Set oConn = DTSGlobalVariables.Parent.Connections("Microsoft Access")
oConn.DataSource = DTSGlobalVariables("D:\folder\File_0304.mdb").Value


Set oConn = Nothing

Main = DTSTaskExecResult_Success
End Function

When I run this script I get:
Active X script Completed
Transform data task General error 80040E4D


What can be wrong

/Kent J.
 
Your code tries to set the datasource to the value of a local variable named "D:\folder\File_0304.mdb." I doubt that variable exists. Your statement should be...

oConn.DataSource = "D:\folder\File_0304.mdb"



If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Also try this.
set oConn = DTSGlobalVariables.Parent.Connections.New("Microsoft.Jet.OLEDB.4.0")
 
I need help with a similar process. I am tring to use the sctive x to run a query in access. Could you help me with this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top