Computer Performance, VBScript, Logon Scripts, Error Codes

Error Code 80004005 - Unspecified Error

Troubleshooting Code Error 80004005 - Unspecified Error

Think of error 80004005 as meaning the script could not access your data.  The most likely reason is a permissions related problem.  Your best chance of resolving this problem is to study carefully any associated message, for example, 'File already in use', or 'Logon Failed'.

Introduction to Error Code 80004005

Error 80004005 is a general error for all manner of events.  I have to confess that I am still trying to understand all the causes of this code number.  One thread that runs through error 80004005 problems is permissions.  Another thread is incorrect format, for example you entering a number instead of a string.  This is particularly true of telephone or fax numbers.

My main interest is in VBScript errors, however, I have added database examples for completeness.

The first branch in your decision tree is this an ASP error or some other ODBC error.

Three types of 80004005 Error

  ‡

VBScript Symptoms WSH Error Code 80004005 - Unspecified Error

What you see is WSH (Windows Script Host) message box. The script does not execute as you had hoped. Instead you get a message box like this picture:

The Causes of Code Error 80004005

VBScript / CScript

1) In this case, VBScript was trying to store a password.  With error 80004005 there is usually an element of access denied.  Insufficient rights, wrong permissions.

2) It can occur when a VBScript attempts to connect to scriptpw.dll.  There are other causes, such as connecting to COM objects or ADO, or other database object.

3) Another thread is Number v String value format. If you are dealing with a phone number, make sure that you add it as string value and not as a pure number.  Extra information supplied by Murda McLoud.  'I worked out that had to convert the number to a string to stop the 80004005 error.  Then the objUser.Put would work properly and save the data.'

Solutions for Error 80004005

This has been a very difficult error to track down.  Possibly the error was due to using WScript instead of CScript.

Check the underlying database, for example, names, exclusive locks and especially permissions.

One additional problem that I had with Error 80004005 was due to a firewall blocking the relevant port, it was either 80 or 135.

Example 1: VBScript with Error 80004005

I have to admit this may not be terribly useful example for your specific problem, but then Code 80004005 is invariably a vague permission problem.

'VBScript
Dim objScriptPW
Dim strPassword, strValidPWord

Set objScriptPW=CreateObject("ScriptPW.Password")
WScript.Echo "Enter password to run script:"
strPassword=objScriptPW.GetPassword()

If strPassword <> strValidPWord Then WScript.Quit

WScript.Echo "Hi Password"

Guy Recommends:  A Free Trial of the Network Performance Monitor (NPM)Review of Orion NPM v10

SolarWinds' Orion performance monitor will help you discover what's happening on your network.  This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.

What I like best is the way NPM suggests solutions to network problems.  Its also has the ability to monitor the health of individual VMware virtual machines.  If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.

Download a free trial of Solarwinds' Network Performance Monitor

Example 2: String v Number Problem

strTel = objExcel.Cells(intRow, 7).Value strFax = objExcel.Cells(intRow, 8).Value

objUser.Put "telephoneNumber", strTel
objUser.Put "facsimiletelephoneNumber", strFax

===============================

The solution is to make sure that the values in intRow 7 and intRow 8 are string values and not pure numbers.

Example 3: Connectivity Problems for Error 80004005

Firstly, the error 80004005 may be 'by design' in that the database has been locked by another process or user and therefore cannot accept a connection at this time.

Secondly, apply good troubleshooting tactics and pay close attention to the Line: number, also any Source: clues.

Examples of Connectivity related problems

There is no server on port 80 at 'BigServer'. (Error code = 80004005)

'Geronimo' is not a valid host name or IP address. (Error code = 80004005)

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

SQL Permissions Problem

Step Error code: 80004005
Step Error Help File:DTSFFile.hlp
Step Error Help Context ID:0

Causes of Connectivity related Problems

As with all 80004005, I would start with permissions.  You may get a good clue such as 'Login Failed' or [ODBC Microsoft SQL Driver] Logon Failed().

When a database is on a different server from the Web server.  Sometimes the problem is using a UNC path to reference a database.   One nasty problem with UNC paths is that even if the database is on the same computer as the Web server, the Web server assumes that the database resides on a different computer.

Permissions and Temporary Files Error 80004005

Double check the permissions on the file and the folder.  In particular ensure that your account can create and/or destroy any temporary files. Temporary files are usually created in the same folder as the database, but the file may also be created in other folders 

Guy Recommends: Permissions Analyzer - Free Active Directory ToolFree Permissions Analyzer for Active Directory

I like the Permissions Monitor because it enables me to see quickly WHO has permissions to do WHAT.  When you launch this tool it analyzes a users effective NTFS permissions for a specific file or folder, takes into account network share access, then displays the results in a nifty desktop dashboard!

Think of all the frustration that this free utility saves when you are troubleshooting authorization problems for users access to a resource.  Give this permissions monitor a try - it's free!

Download Permissions Analyser - Free Active Directory Tool

Error 80004005 Symptoms With Data Access Components

MTS - Microsoft Transaction Server
You are trying to pass and ADO Recordset from COM to ASP.  When passing a disconnected ActiveX Date Objects (ADO) Recordset from a Component Object Model (COM) component inside a Microsoft Transaction Server (MTS) Server Package/COM+ Application to Active Server Pages (ASP), you may receive one of the following error messages:
error '80004005'
Unspecified error
/xxx.asp, line x

RESOLUTION
When trying to pass values of the types, such as strings (BSTR), you must declare those field types explicitly instead of using adVariant.
Example
rs.Fields.Append "ID", adVariant 'this works since it is an Integer
rs.Fields.Append "fname", adVarChar, 50
rs.Fields.Append "lname", adVarChar, 50

Another Example of a Code 80004005 Error

[CODE]
Sub SetDepartment(objUser, strDepartment)
If IsNull(strDepartment) then
objUser.Put "department", ""
Else
objUser.Put "department", strCompany 'TYPO!
End If
objUser.SetInfo
End Sub
[/CODE]

Kindly sent in by Simon T.

Solarwinds Free WMI MonitorGuy Recommends: WMI Monitor and It's Free!

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.  Fortunately, SolarWinds have created the WMI Monitor so that you can examine these gems of performance information for free.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor


Do you need additional help?

Give something back?

Would you like to help others?  If you have a good example of this error, then please email me, I will publish it with a credit to you:

If you like this page then please share it with your friends

 


 *


Custom Search

Site Home

Solarwinds Network Device MonitorSolarWinds' Free Network Device Monitor

Thus utility makes it easy to check the health of a router or firewall.  Check the real-time performance and availability statistics for any device on your network.

Get started with an extensive collection of "out-of-the-box" monitors for popular network devices.  Download your free Network Device Monitor

Author: Guy Thomas Copyright © 1999-2014 Computer Performance LTD All rights reserved.

Please report a broken link, or an error to: