I went to the customer to implement Localhost and database connection a few days ago and installed our software on a newly installed machine. The configuration is as follows: Operating System: windows2003 Database: SQLSERVER2000 supporting environment:. NETFRAMEWORK1.1 after the application software is installed, the system prompts that the database connection fails. The server localhost,
I went to the customer to implement Localhost and database connection a few days ago and installed our software on a newly installed machine. The configuration is as follows: Operating System: windows2003 Database: SQL SERVER 2000 supporting environment: After the. NET FRAMEWORK 1.1 application software is installed, the system prompts that the database connection fails. Server = localhost,
Connect Localhost to database
A few days ago, I went to the customer and installed our software on a newly installed machine. The configuration is as follows:
Operating System: windows2003
Database: SQL SERVER 2000
Supported environment:. net framework 1.1
After the application software is installed, the system prompts "database connection failed" upon login ". The server = localhost, that is, the local machine, and the database name is correct. Strange.
I have never encountered this problem before. In principle, SQL SERVER is installed on the local machine, and no MDAC is installed. Is there any other problem? I tried several more times and still failed.
Accidentally changed localhost to the machine name on the local machine, but the connection was successful!
Why?
I found that there was always a Red Cross in the network connection in the tray area. When I clicked on it, I was prompted that the Network was not connected. It may be related to this. In fact, the network card has been installed, but the network cable is not connected. Connect to the network cable, connect to the network, and change the database connection string back to "server = localhost". The connection is successful.
It seems that localhost has a lot to do with the network. Although it represents local, it is a network object, or it is a name that only applies to the network. Therefore, "server = localhost" and "server = Local Machine name" are sometimes not necessarily equal.