SQLTeam.com | Weblogs | Forums

DTS - Login failed for user


#1

I have a DTS package created and also have Global Variable on it..I'm trying to use the Global Variable created by DTS but I encountered some error..

Error : "Login failed for user dbIDdestCon"

Dim oGlobal As DTS.GlobalVariable

Dim dbIDdestCon as String

Set oGlobal = goPackage.GlobalVariables.New("db_DestID")
oGlobal = "sa"
dbIDdestCon = oGlobal
goPackage.GlobalVariables.Add oGlobal
Set oGlobal = Nothing

oConnection.Name = "Connection 1"
oConnection.id = 1
oConnection.Reusable = True
oConnection.ConnectImmediate = False
oConnection.DataSource = "***"
oConnection.UserID = "dbIDdestCon"
oConnection.ConnectionTimeout = 60
oConnection.Catalog = "
"
oConnection.UseTrustedConnection = False
oConnection.UseDSL = False

What is wrong with my code? Please help me :frowning: