This method is applicable to SQL Server 2000 + Windows XP
1. exclude human factors:
Confirm the connection information: Make sure the following fields are correct for connecting to the database:
M_strsponse = "127.0.0.1"; // database address
M_strpwd = "123456"; // database connection password
M_struid = "sa"; // database username
M_strcatalog = "db_zdzx"; // Database Name
2. Install patches:
If the error still persists when 1 is correct, it must be XP's SP2 or SP3 without installing the patch file "Microsoft SQL Server 2000 SP4 ",
Http://download.microsoft.com/download/9/ B /f/9bff6646-2cdb-4069-ada0-548be9cb9338/SQL2000-KB884525-SP4-x86-CHS.EXE
After downloading, log out of SQL Server before installation; otherwise, the installation will fail. When double-clicking a file for the first time, the file is actually decompressed. You need to execute setup. bat in the decompressed directory to install it.(I have been stuck in this step for a long time, and the installation has been unsuccessful. Finally, click setup. bat in the decompressed directory of drive C to install it successfully ).
3. Verification:
After completing the preceding steps, go to the SQL query analyzer and run "select @ version". The result is "Microsoft SQL Server 2000-8.00.2039
(Intel x86)... ", pay attention to the red number, it should be" 19... "before installing the patch, forget the specific amount, anyway, less than 2000.
4. extensions:
If your operating system is XP, you must install XP SP2 again no matter whether or not SQL SP4 has been installed before and enable port 1433 in the firewall, otherwise, it cannot be accessed by other computers.