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 Code Error 80004005
Error code 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.
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.
Guy Recommends: SolarWinds Engineer's Toolset v10
The Engineer's Toolset v10 provides a comprehensive console of utilities
for troubleshooting computer problems. Guy says it helps me
monitor what's occurring on the network, and the tools teach me more about how the system
itself operates.
There are so many good gadgets, it's like having free rein of a
sweetshop. Thankfully the utilities are displayed logically: monitoring, discovery, diagnostic, and Cisco tools.
Download your copy of the Engineer's Toolset v 10
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()
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.
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.
Try
a different solution, download SolarWinds ipMonitor
Here is my thinking,
ipMonitor will give you valuable data about your network and servers.
This extra information just may unlock the solution to your error code.
One more thing, sometimes when troubleshooting you go around in circles;
therefore if you try a different, but related approach, you may just crack the
problem.
Free Download
of SolarWinds ipMonitor (21 day eval).
Their topics and material are ideal for getting you started with VBScript. The
videos are easy to follow and you can control the pace. Try their free demo material and then see if you want to buy the full package.
See more about VB Script Training CD.