I have an Access application that writes to a SQL Server database. I would now like it to write to a different SQL Server database instead.
- Made sure the new database if properly configured with
dbowner
permissions for my user credentials - Wrote a test record using that user credentials
- In the Control Panel, set ODBC source to the right database. Tested connection successfully
- In Access, Database tools > Visual Basic section, I changed the connection string and substituted the login credentials with the new userid and password.
But when I input values in the form, it STILL saves to the old database.
I did notice that in the Linked Table Manager, the linked tables still point to the older database. But when I select all and click OK, the message is 'All selected tables have been successfully refreshed'.
What do I need to do to point the tables to the new database?
Edit
I did a 'Find' for the old database name and edited the connection string on all the forms where-ever that old database name existed and replaced it with my new database name.
Example:
.ConnectionString = "Provider=SQLNCLI11;Data Source=(old datasource name);Initial Catalog=(old database name);User ID=(old userID);Password=(old password)"
changed to
.ConnectionString = "Provider=SQLNCLI11;Data Source=(new datasource name);Initial Catalog=(new database name);User ID=(new userID);Password=(new password)"