How to Fix Error 126

What Causes Error 126?

Error 126 is usually displayed at run time when some of the DLLs on your system are missing. The message with the error code 126 may also be displayed when an application is trying to connect to a database and a required DLL is not specified in your machine’s PATH. It is important to specify the path to the required DLL because many databases require that you install and configure a client side library to enable any client to connect. Some of the databases that require a client side library are WinSQL Oracle Driver, Oracle ODBC Driver, and Microsoft Oracle Driver.

In this article, we will have a look at some of the causes of 126 error messages and discuss the methods you can follow to repair them.

Repair Error 126

You may receive the following error message when you try to perform a nested installation of MSI packages from the SQL Server 2000 Desktop Engine package.

Loading extended custom action library sqlcax.dll
Error 126 loading library sqlcax.dll
Action ended 21:15:09: InstallFinalize. Return value 3

For instance, the error is displayed if you try to open a Desktop Engine MSI package such as SqlRun01.msi from one of the custom parent MSI packages. The error may also display if you try to open a Desktop Engine MSI package built using SQL Server 2000 Desktop Engine merge modules from one of the custom parent MSI packages.

To resolve the error, you must merge the components of Desktop Engine directly into your package using SQL Server 2000 Desktop Engine merge modules. You may also directly open the Desktop Engine setup package and not use the nested installation.

When trying to access an SQL database from Microsoft Office Excel, you may receive the following error message:

Specified driver could not be loaded due to system error 126 (SQL Server)

This error occurs when the SQL Server ODBC driver from your (client) computer is missing or corrupt. By default, the driver comes along with your Microsoft Windows. However, in case of an error, you can repair it by downloading the latest Microsoft Data Access Components from the Microsoft Support Website.

You may receive the error message given below, when you try to start the Server service on your Windows XP computer.

Error 126: The specified module cannot be found

This error occurs when the DLL file Srvsvc.dll file is missing from your computer or is corrupt. To fix this error, you will have to extract the original Srvsvc.dll from the Windows XP installation CD and copy it to the System32 (C:\Windows\System32) folder on your computer. To extract and copy the file to system32, insert the Windows XP installation CD into the CD-drive of your computer. Open Command Prompt, and type the following command and press Enter.

expand <CD_drive>:\i386\srvsvc.dl_ C:\Windows\system32\srvsvc.dll

Note: Replace CD_Drive with the drive letter for your CD Drive.

After you have run the command, exit the Command Prompt window and start the Server service from the Service management console (On Start > Run type Services.msc and press Enter.)

Usually, errors such as error 126 occur due to problems in your system files and the system registry. To keep your PC free from various system and fatal error messages, you must perform regular system and registry maintenance, and ensure that your system is free from any unnecessary clutter and junk information. You must keep your PC updated with the latest security releases and patches, and regularly update and run antivirus scans to keep the computer free from malicious infections. To perform regular registry maintenance, you may opt to use a registry cleaner tool such as PCHealthBoost and run it regularly to ensure that your registry is free from unwanted data and errors.