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

Last reviewed: October 30, 1997
Article 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 platform: 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:

   ARTICLE-ID: Q175756
   TITLE     : PRB: Setup Wizard Displaying Message Box With '118' and
               OK Button


Additional query words: Error 3034, Books Online, DAO, Disk or network
error.
Keywords : vb5all
Version : WINDOWS:5.0
Platform : NT WINDOWS
Issue type : kbprb
Solution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.