K
Kent Johnson
Hi all,
I have this script which is supposed log me in to a SQL-server (not trusted)
from Access.
ServerName = "MyServer"
DatabaseName = "MyDb"
UserName = "MyUser
Password = "MyPwd"
Set tdfCurrent = dbCurrent.CreateTableDef(typNewTables(intLoop).TableName)
tdfCurrent.Connect = "ODBC;DRIVER={sql
server};DATABASE=" & _
DatabaseName & ";SERVER=" & ServerName & _
";Uid=" & UserName & ";" & _
"Pwd=" & Password
tdfCurrent.SourceTableName = typNewTables(intLoop).SourceTableName
dbCurrent.TableDefs.Append tdfCurrent
....but Im promted by ODBC:
"Login failed for user (null). Reason: not associated with a trusted SQL
server connection"
What can be wrong?
/Kent J.
I have this script which is supposed log me in to a SQL-server (not trusted)
from Access.
ServerName = "MyServer"
DatabaseName = "MyDb"
UserName = "MyUser
Password = "MyPwd"
Set tdfCurrent = dbCurrent.CreateTableDef(typNewTables(intLoop).TableName)
tdfCurrent.Connect = "ODBC;DRIVER={sql
server};DATABASE=" & _
DatabaseName & ";SERVER=" & ServerName & _
";Uid=" & UserName & ";" & _
"Pwd=" & Password
tdfCurrent.SourceTableName = typNewTables(intLoop).SourceTableName
dbCurrent.TableDefs.Append tdfCurrent
....but Im promted by ODBC:
"Login failed for user (null). Reason: not associated with a trusted SQL
server connection"
What can be wrong?
/Kent J.