Hi
I am trying to create some dsn less connections for my linked tables (sql 2005).
I'm using the below with a username and password declared.
...however when i reopen the database i get a connection error saying login failed for G Frewin (that's me) so it's not using the user/pw i provided??
am i going wring somewhere in my code?
Thanks.
I am trying to create some dsn less connections for my linked tables (sql 2005).
I'm using the below with a username and password declared.
Code:
Dim db As Database
Dim T As TableDef
Set db = CurrentDb
db.TableDefs("CBF_master").Connect = "ODBC;DRIVER=SQL Server;SERVER=SQL-SRV;DATABASE=MyDatabase;UID=MyUser;PWD=MyPassword"
db.TableDefs("MyLinkedTable").RefreshLink
...however when i reopen the database i get a connection error saying login failed for G Frewin (that's me) so it's not using the user/pw i provided??
am i going wring somewhere in my code?
Thanks.