MS DTS Object Package Library

J

Joe Delphi

Hi,

I am trying to execute an MS SQL Server DTS package from my Microsoft
Access form. Here is the code I am using:

Private Sub cmdImportScats_Click()
Dim pkg As DTS.Package
Set pkg = New DTS.Package
pkg.LoadFromSQLServer "NTOMT76SQL,7115", "", "", DTSSQLStgFlag_Default, "",
"", "", "[ad\jmuseck].MASSCOMP_PAYAVAIL"
pkg.Execute
Set pkg = Nothing 'Free Memory'

I get an error on the LoadFromSQLServer line, but the error message is kind
of vague and just tells me that "its wrong". Also, I am using Windows
Authentication to get into my SQL Server database so that is why the
username and password arguments are blank. What am I doing wrong?

Any help appreciated.

JD
 
T

TC

I think you'd get more help on this, in an SQL*Server group. It's not
really an Access question. The method in question (LoadFromSQLServer)
is not an Access method, AFAIK.

Also, IMHO, you need to make the effort to transcribe the error message
properly. Readers shouldn't be asked to guess - there are just too many
messages. And something about the exact text of the message, might ring
a bell for someone.

HTH,
TC [MVP Access]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top