423,688 Members | 1,938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

Asp Error: Microsoft VBScript runtime (0x800A01A8) Object required: ''

P: 16
Hi can anybody help me i get this error when running this code.
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
And then a line number indicating where the error is, i cant see any errors with this code please assist.

Thanks in advance.

Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
  2. <%
  3. Dim QryDisplay__MMColParam
  4. QryDisplay__MMColParam = "1"
  5. If (Request.QueryString("Application_id") <> "") Then 
  6.   QryDisplay__MMColParam = Request.QueryString("Application_id")
  7. End If
  8. %>
  9. <%
  10. Set objconn = Server.CreateObject("ADODB.Connection")
  11. objconn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("myPath")
  12. objconn.Open
  13.  
  14. %>
  15. <%
  16. Dim QryDisplay
  17. Dim QryDisplay_numRows
  18.  
  19. Set QryDisplay = Server.CreateObject("ADODB.Recordset")
  20. QryDisplay.ActiveConnection = objconn
  21. QryDisplay.Source = "SELECT * FROM QueryDisplayFields WHERE Application_id = " + Replace(QryDisplay__MMColParam, "'", "''") + ""
  22. QryDisplay.CursorType = 0
  23. QryDisplay.CursorLocation = 2
  24. QryDisplay.LockType = 1
  25. QryDisplay.Open()
  26.  
  27. QryDisplay_numRows = 0
  28. %>
Jul 3 '07 #1
Share this Question
Share on Google+
4 Replies


P: 13
unfortunately this is not a help response but I am also having the same problem with the following code
the error is on line 29

i hate to do this but i just saw the heading and I didnt want to start a new thread with this same problem
code: (asp)
Expand|Select|Wrap|Line Numbers
  1. <%@ Language = "VBScript" %>
  2. <% Option Explicit%>
  3.  
  4. <!--#include virtual="/includes/adovbs.inc"-->
  5. <!--#include virtual="/salesdesk/includes/Maint_ConnectADO.asp"-->
  6. <!--#include virtual="/salesdesk/includes/access_control.asp"-->
  7.  
  8. <%dim connection%>
  9. <%dim sSQL,sConnString, obj_connection%>
  10.  
  11. <%if request.form("isSubmitted") = "yes" then
  12.  
  13. sConnString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
  14. "DBQ= " & Server.MapPath("/salesdesk/database/Saleshelpdesk.mdb") & ";"
  15. Set obj_connection = Server.CreateObject("ADODB.Connection")
  16. obj_connection.Open(sConnString)
  17. 'call openconnection()
  18. sSQL="INSERT INTO tblTest(CompletedForm, AddClient) " _
  19. &"VALUES ('" &request.form("CompletedForm") &"' , '" _
  20. & request.form("AddClient") & "')"
  21.  
  22. obj_connection.execute(sSQL)
  23.  
  24. end if
  25. If err.number=0 Then
  26. response.write "the data was inserted successfully."
  27. End If
  28.  
  29. obj_connection.Close
  30. Set obj_connection = Nothing
  31. response.redirect = "helplist.asp" 
  32. 'call closeconnection()
  33. %>
  34.  
  35.  
Jul 3 '07 #2

jhardman
Expert 2.5K+
P: 3,401
If I count correctly, then the error is on the line that closes the connection. Is this right? It is not necessary to close the connection, all connections are closed at the end of the script automatically, so if this is indeed where the error comes up, you can just delete that line

Jared
Jul 3 '07 #3

P: 13
hi j

i hope you were talking about my code(cyberdawg)

if you were i removed the closeconnection() method from the code
my response.write statement appears when you click submit
but the checkbox data does not send the data to the table in my database.
Jul 4 '07 #4

P: 16
I resolved my error thankyou very much but i did not delete my close connection code.

What i did was rewrite my query in my database and updated it on the webserver. That seemed to correct my error.

Thankyou Anyway.
Jul 4 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.