I recently upgraded 2 of the servers on my MS Access 2007 database. A UA server and a Production server. WHen I converted over to the new severs I just changed the names in code. Also, I had to relink all the tables to the new server. I had to create a DSN. I got all the tables linked.
Well, now whenever I open the database it has the SQL Server Login screen, with a username and password. Why does that come up now?
So, I have to enter my SQL Server password to login to the DB. Any help? ANyone had this happen?
Below is the code from my code ModLink.
Expand|Select|Wrap|Line Numbers
- Public Function PingTRIPSDatabaseITUAServer()
- Dim connectString As String
- 'connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ05UA;Database=TRIPS;UID=trimsuser;pwd=trimsdata"
- connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ81UA;Database=TRIPS;UID=trimsuser;pwd=trimsdata"
- Set db = DBEngine.OpenDatabase("", False, True, connectString)
- End Function
- Public Function PingTRIPSDatabaseITProductionServer()
- Dim connectString As String
- 'connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ09;Database=TRIPS;UID=trimsuser;pwd=nat10nal"
- connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ82;Database=TRIPS;UID=trimsuser;pwd=nat10nal"
- Set db = DBEngine.OpenDatabase("", False, True, connectString)
- End Function
- Public Sub LinkTripsTablesUAITServer(table As String)
- ' cn = "odbc;driver={SQL Server};server=GAXGPSQ05UA;database=TRIPS;uid=trimsuser;pwd=trimsdata"
- cn = "odbc;driver={SQL Server};server=GAXGPSQ81UA;database=TRIPS;uid=trimsuser;pwd=trimsdata"
- Set db = CurrentDb
- Set td = db.CreateTableDef()
- td.Name = table
- td.SourceTableName = "dbo." & table
- td.Connect = cn
- Set tds = db.TableDefs
- tds.Append td
- End Sub
- Public Sub LinkTripsTablesProductionITServer(table As String)
- 'cn = "odbc;driver={SQL Server};server=GAXGPSQ09;database=TRIPS;uid=trimsuser;pwd=nat10nal"
- cn = "odbc;driver={SQL Server};server=GAXGPSQ82;database=TRIPS;uid=trimsuser;pwd=nat10nal"
- Set db = CurrentDb
- Set td = db.CreateTableDef()
- td.Name = table
- td.SourceTableName = "dbo." & table
- td.Connect = cn
- Set tds = db.TableDefs
- tds.Append td
- End Sub