strange error (1 Viewer)

swarv

Registered User.
Local time
Today, 18:30
Joined
Dec 2, 2008
Messages
196
Hi all,

I am getting the following

Code:
Technical Information (for support personnel)
[LIST]
[*]Error Type:
Provider (0x80004005)
Unspecified error
/add_to_guestbook.asp, line 60

[*]Browser Type:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; .NET4.0C; .NET4.0E) 
[*]Page:
POST 0 bytes to /add_to_guestbook.asp 
[*]POST Data:

[*]Time:
29 October 2009, 17:42:13 

[*]More information:
[URL="http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&ID=500;100&cat=Provider&os=&over=&hrd=&Opt1=&Opt2=%2D2147467259&Opt3=Unspecified+error"]Microsoft Support[/URL]
[/LIST]
and the script never places the info into the database.

the add_to_database.asp is below:

Code:
Dim adoCon    'Holds the Database Connection Object
Dim rsAddComments  'Holds the recordset for the new record to be added to the database
Dim strSQL   'Holds the SQL query for the database
'Create an ADO connection odject
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")
'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"
'Create an ADO recordset object
Set rsAddComments = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT tblComments.Name, tblComments.Speed, tblComments.Patience, tblComments.Clear, tblComments.Helpfulness, tblComments.Accuracy, tblComments.Persistance, tblComments.Time, tblComments.Met, tblComments.Servicehours, tblComments.Person, tblComments.Knowledge, tblComments.Improve, tblComments.Comments, tblComments.how FROM tblComments;"
'Set the cursor type we are using so we can navigate through the recordset
rsAddComments.CursorType = 2
'Set the lock type so that the record is locked by ADO when it is updated
rsAddComments.LockType = 3
'Open the tblComments table using the SQL query held in the strSQL varaiable
rsAddComments.Open strSQL, adoCon
'Tell the recordset we are adding a new record to it
rsAddComments.AddNew
'Add a new record to the recordset
rsAddComments.Fields("Name") = Request.Form("name")
rsAddComments.Fields("Speed") = Request.Form("speed")
rsAddComments.Fields("Patience") = Request.Form("patience")
rsAddComments.Fields("Clear") = Request.Form("clear")
rsAddComments.Fields("Helpfulness") = Request.Form("helpfulness")
rsAddComments.Fields("Accuracy") = Request.Form("accuracy")
rsAddComments.Fields("Persistance") = Request.Form("persistance")
rsAddComments.Fields("Time") = Request.Form("time")
rsAddComments.Fields("Met") = Request.Form("met")
rsAddComments.Fields("Servicehours") = Request.Form("servicehours")
rsAddComments.Fields("Person") = Request.Form("person")
rsAddComments.Fields("Knowledge") = Request.Form("knowledge")
rsAddComments.Fields("Improve") = Request.Form("improve")
rsAddComments.Fields("Comments") = Request.Form("comments")
rsAddComments.Fields("how") = Request.Form("how")
'Write the updated recordset to the database
rsAddComments.Update
'Reset server objects
rsAddComments.Close
Set rsAddComments = Nothing
Set adoCon = Nothing
'Redirect to the guestbook.asp page
Response.Redirect "success.html"
%>

line 60 is:
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("guestbook.mdb")

which I know works as i did have it working.

Any ideas anybody?

Thanks
Martin
 

Users who are viewing this thread

Top Bottom