Group: General Forum Members
Last Login: Monday, December 15, 2014 2:41 PM
|I have a Windows Form application (not an ASP.NET app) where I would
like to execute a DTS package on my local SQL server instance. The
code looks like this:
Dim objDTSPackage As New DTS.Package
objDTSPackage.LoadFromSQLServer("(local)", "USERNAME", "PASSWORD",
DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", "Import
Shuttle Inventory", "")
I know that my server and package name are correct, because if I
switch to "DTSSQLStgFlag_UseTrustedConnection", the package executes
correctly. When I attempt to run the code above, it get the error
"Login failed for user 'USERNAME'. Reason: Not associated with a
trusted SQL Server connection.". For discussion purposes, I am
showing generic UN & PW values, but am 100% sure that I am using the
correct credentials for a login on my server.
Following someone else's post, I went to the package's properties and
on the "Login" tab selected "Log package execution to SQL server".
Once this was checked, I entered my user's credentials under the "SQL
Server Authenticaion" section. When I click "OK", I get the same
error message as my code - so at least things are consistent.
I know there have been other posts about this issue in regards to
ASP.NET pages attempting to do this. The solutions I saw there
involved using the ASP.NET account to get things working - which I
would rather not do here, even if I could.
I would greatly appreciate any comments or suggestions. Thank you!