This is the last routine in Sun Xin's video. Use VB and VC ++ 6.0 to link and access the database. The ADO method is used. Because you want to access SQL Server. So I installed an SQL Server version. Run VC ++ before installation.ProgramAlways prompt that an unknown error occurs (I used a try or catch statement); when connecting to the database in VB, I always prompt that the SQL server does not exist or the access is denied. Check whether SQL Server is installed on my computer. At that time, I thought that the database was built by the system (I only blame myself for being too stupid and naive ). Then download SQL Server 2000 pack4 and install it. But the program is still that error. Okay, I'm so stupid again. Use the patch as the installation package.
This download is correct. However, a problem occurs during installation. The error message is as follows: a previously installed program has created a pending file on the computer. You need to restart the computer before running the installation. I restarted it, but I still cannot. Later, Baidu took the following three steps and I directly reproduced them:
1. Check whether SQL Server exists in the Add/delete programs on the control panel. (None of mine)
2. Delete all directories of SQL Server that have not been deleted. (I have never installed it at all, but my predecessors may have installed it, and I have not managed it. I just went through step 1)
3. open the Registry Editor (START-> Run-> enter Regedit), and find the pendingfilerenameoperations item in HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager to delete it. Then you can install it smoothly.
After the installation, you need to access SQL Server. You must first start its service manager. Forgive me for having never touched any databases before. This is also a new knowledge for me.
Finally, the database is connected successfully!