All Forums >> [Scripting] >> ASP >> VBScript Runtime Error Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Posts: 34
Score: 0
Joined: 4/12/2005
From: USA
Status: offline
Can someone help me fix the following error:
Microsoft VBScript runtime error '800a01a8' Object required: '' line 14
-The line adoCon.Open to ("/jon52988/db/guestbook.mdb") should be one line the forum may cut it into 2 lines.
My code: <html> <head> <title> Delete </title> </head> <body bgcolor = "white" text = "black"> <% Dim adoCon Dim rsDeleteEntry Dim strSQL Dim IngRecordNo
lngRecordNo = CLng(Request.QueryString("ID")) Set strSQL = Server.CreateObject("ADODB.Connection") adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/jon52988/db/guestbook.mdb") Set rsDeleteEntry = Server.CreateObject("ADODB.RecordSet") strSQL = "SELECT * FROM tblComments WHERE ID_no=" & "IngREcordNo" rsDeleteEntry.LockType = 3 rsDeleteEntry.Open strSQL, adoCon rsDeleteEntry.Delete rsDelteEntry.Close Set rsDelteEntry = Nothing Set adoCon = Nothing Response.Redirect "delete_select.asp" %> </body> </html>
Posts: 12
Score: 0
Joined: 4/25/2005
From: France
Status: offline
Sorry, it doesn't render well. the first one is a single quote, followed by a double quote. The end of the line is a single quote enclosed in double quotes.
Posts: 34
Score: 0
Joined: 4/12/2005
From: USA
Status: offline
Actually when i completely removed the quotes i received an error. Mr. Token found the error. It was Set strSQL = Server.CreateObject("ADODB.Connection") should of been Set adoCon = Server.CreateObject("ADODB.Connection")
but now i have run into another error Too Few Parameter Explicit 1.