Home All Groups Group Topic Archive Search About

MS DTS Object Package Library

Author
12 Jan 2006 3:24 AM
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

Author
12 Jan 2006 10:00 AM
Enric
could you please so kind provide us the whole message? It's strange.

Show quote
"Joe Delphi" wrote:

> 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
>
>
>

AddThis Social Bookmark Button