Run-time Error '3043' When Using Books Online or DAO

ID: Q175755


The information in this article applies to:
  • Microsoft Visual Basic Control Creation, Professional, and Enterprise Editions for Windows, version 5.0
    on the following platforms: NT


SYMPTOMS

"Run-time error '3043', disk or network error" message.


CAUSE

The above error is generated when you do not have a valid directory (usually the Temp directory) pointed to by the Environment User Variable TMP under Windows NT 4.0.


RESOLUTION

Create a valid (Temp) directory for the TMP Environment User Variable. From Control Panel, double-click the System icon. Select the Environment tab. Under "User Variables for [UserName]," change the value of TMP to an existing directory name.


MORE INFORMATION

Steps to Reproduce the Behavior:

There are two ways to reproduce this behavior under Windows NT 4.0 (both server and workstation).

Using Books Online

  1. From Control Panel, double-click on the System icon.


  2. Click on the Environment tab.


  3. Under "User Variables for [Username]," change the value of TMP to a non-existing directory name, or delete or rename the existing directory pointed to by the TMP variable.


  4. Run Books Online. You should get the following message:
    "Run-time error '3043', disk or network error"


Using DAO

  1. Repeat steps 1 to 3 as above.


  2. Start a new Visual Basic Standard EXE project.


  3. Add one of the following references to your project:

    • Microsoft DAO 2.5/3.0 Compatibility Library


    • DAO 2.5/3.5 Compatibility Library


    • DAO 3.0 Object Library


    • DAO 3.5 Object Library




  4. Add the follow code to the Load event procedure in Form1:
    
           Dim WS as WorkSpace
           Dim sPath as String
           sPath = DBEngine.IniPath          ' This is fine
           Set WS = DBEngine.Workspaces(0)   ' Error at this point... 


  5. Run the project. You should get the following message:
    "Run-time error '3043', disk or network error"


To correct this behavior, create a directory (such as Temp) for the TMP variable.


REFERENCES

For more information on the cause of this error message, please see the following article in the Microsoft Knowledge Base:

Q175756 PRB: Setup Wizard Displaying Message Box With '118' and OK Button

Additional query words: Error 3034 Books Online DAO Disk network Error kbVBp500 kbdse kbDAO

Keywords : kbGrpVBDB
Version :
Platform : NT WINDOWS
Issue type : kbprb


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.