By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Everytime I open my Access database it throws up a "SQL Server Login" need help

anoble1
100+
P: 225
Hi,

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
  1. Public Function PingTRIPSDatabaseITUAServer()
  2.     Dim connectString As String
  3.     'connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ05UA;Database=TRIPS;UID=trimsuser;pwd=trimsdata"
  4.     connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ81UA;Database=TRIPS;UID=trimsuser;pwd=trimsdata"
  5.     Set db = DBEngine.OpenDatabase("", False, True, connectString)
  6. End Function
  7.  
  8. Public Function PingTRIPSDatabaseITProductionServer()
  9.     Dim connectString As String
  10.     'connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ09;Database=TRIPS;UID=trimsuser;pwd=nat10nal"
  11.     connectString = "ODBC;Driver={SQL Server};Server=GAXGPSQ82;Database=TRIPS;UID=trimsuser;pwd=nat10nal"
  12.     Set db = DBEngine.OpenDatabase("", False, True, connectString)
  13. End Function
  14.  
  15. Public Sub LinkTripsTablesUAITServer(table As String)
  16.  
  17. '    cn = "odbc;driver={SQL Server};server=GAXGPSQ05UA;database=TRIPS;uid=trimsuser;pwd=trimsdata"
  18.     cn = "odbc;driver={SQL Server};server=GAXGPSQ81UA;database=TRIPS;uid=trimsuser;pwd=trimsdata"
  19.  
  20.     Set db = CurrentDb
  21.     Set td = db.CreateTableDef()
  22.     td.Name = table
  23.     td.SourceTableName = "dbo." & table
  24.     td.Connect = cn
  25.  
  26.     Set tds = db.TableDefs
  27.     tds.Append td
  28.  
  29. End Sub
  30.  
  31. Public Sub LinkTripsTablesProductionITServer(table As String)
  32.  
  33.     'cn = "odbc;driver={SQL Server};server=GAXGPSQ09;database=TRIPS;uid=trimsuser;pwd=nat10nal"
  34.     cn = "odbc;driver={SQL Server};server=GAXGPSQ82;database=TRIPS;uid=trimsuser;pwd=nat10nal"
  35.  
  36.     Set db = CurrentDb
  37.     Set td = db.CreateTableDef()
  38.     td.Name = table
  39.     td.SourceTableName = "dbo." & table
  40.     td.Connect = cn
  41.  
  42.     Set tds = db.TableDefs
  43.     tds.Append td
  44.  
  45. End Sub

Mar 17 '12 #1
Share this Question
Share on Google+
1 Reply


ADezii
Expert 5K+
P: 8,638
Can you use Trusted_Connect=True within the Connection String to use Windows Authentication?
Mar 18 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.