title: Can't connect to SQL Server 2008 R2 with new windows 7 64bit machine
body: <p>I have been trying to figure this out for days now...  I have this old application that I have not had to mess with in years and this old windows 2000 (32bit) machine went out on me. So I ended up replacing that machine with a new Windows 7 (64bit) machine.</p>
  
  <p>Everything seems to be working just fine with the exception of one thing. When I try to connect to the database with the app it keeps prompting me for a password as if it's not able to connect or see the server is a SQL Server in the first place!</p>
  
  <p>I have tested the connection with the ODBC Data Source Administrator and that worked perfectly "TESTS COMPLETED SUCCESSFULLY!". But when I try to connect using my app it just times out and asks for me to enter the user/pass again.  :/</p>
  
  <p>I had another old machine (windows 2000 32bit) up and running and it was accessing the db just fine so I know the server is setup right with open ports and no firewall etc..</p>
  
  <p>I just can't seem to find a reason this client will not connect! Any ideas?</p>
  
  <hr>
  
  <p><strong>Update #1:</strong></p>
  
  <p>It seems that when turning on logging auditing in the SQL Server Management Studio I was able to see the following two log entries (in the following order)...</p>
  
  <blockquote>
    <p><strong>TEST #1</strong></p>
    
    <p>Login succeeded for user 'pubclient'. Connection made using SQL
    Server authentication.</p>
    
    <p>Login failed for user 'pubclient'. Reason:
    Failed to open the explicitly specified database.</p>
  </blockquote>
  
  <p>So when I try this on the local client machine with the temp install of SQL Server 2008 r2 it works perfectly fine.  Same exact settings just a different host in the settings ini file used!</p>
  
  <blockquote>
    <p><strong>TEST #2</strong></p>
    
    <p>Login succeeded for user 'pubclient'. Connection made using SQL Server
    authentication.</p>
    
    <p>Starting up database 'iri'.</p>
    
    <p>Login succeeded for user 'pubclient'. Connection made using SQL Server
    authentication.</p>
  </blockquote>
  
  <p>I don't have to specify a database on the local machine (client->client), so why do I when trying to connect from client->server?</p>
  
  <hr>
  
  <p><strong>UPDATE #2</strong></p>
  
  <p>So from what I can tell at this point is if I use a bogus host (one that can not be pinged) this application will ask me for a user/pass (because it can not make a connection to anything).  If I use a host that does respond to a ping it seems to be happy and proceed.  By proceed I mean it will connect to the correct remote server (as shown in UPDATE #1 on TEST #2) but before it does the second login attempt (<code>Login succeeded for user 'pubclient'. Connection made using SQL Server authentication.</code>) it decides to try and connect to the LOCAL SQL server I set up as a test on the client machine!!!  I do not have the client host listed ANYWHERE in the settings (the client machine name was just made up so it's not hard coded).  For some reason now that I have upgraded the client PC to Windows 7 64bit (from Windows 2000 32bit) it wants to continue trying to connect to the local machine instead of the remote host like it does initially!!  WHAT THE HECK!  I have no clue why it wants to connect to the localhost instead but this does NOT happen on Windows 2000...</p>