Hi There,
I currently have all my tables in MS SQL and they are connecting in the standard way (used the external data section to link to the tables through ODBC in Office 2007 and the MS SQL 2005 Native Client).
I was wondering if there was a way in VBA before my database does anything, to specify a different username/password to connect to the SQL server with? I have 2 SQL Authentication usernames (one is read-only) and I have the two DSN files with the slightly different usernames and passwords in them.
Is there a way in VBA to specify different username and password OR to choose a different DSN file to use?
Thanks.
Matt.
I currently have all my tables in MS SQL and they are connecting in the standard way (used the external data section to link to the tables through ODBC in Office 2007 and the MS SQL 2005 Native Client).
I was wondering if there was a way in VBA before my database does anything, to specify a different username/password to connect to the SQL server with? I have 2 SQL Authentication usernames (one is read-only) and I have the two DSN files with the slightly different usernames and passwords in them.
Is there a way in VBA to specify different username and password OR to choose a different DSN file to use?
Thanks.
Matt.
Comment