Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Jan 2004
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft VBScript runtime (0x800A01A8) Object required: "" ERROR

    Hi,

    Anybody knows why whenever I submit my form and insert my data into Access i get this error?

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

    The line that VBScript has detected an error (which im not quite sure there is) is line 290:

    conn.Execute "insert into CustomerParticularsDB(name,division,projectName, " _ ...

    There shouldnt be a problem with my codes as they have been tested before...This error came out just after I have added a header and left nav bar.... hope someone is able to help

    THanks alot.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    It seems that the connection object conn is not set. Can we see some relevant codes?

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I agree with GlennGV... that definitely sounds like the problem. But we need to see more code to see what you're doing and fix it.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    New Coder
    Join Date
    Jan 2004
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks pple...the problem was with the conn...Thanks for the help!

  • #5
    New to the CF scene
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry help me

    i get the same error can someone help me too line marked i red

    'Get the shopping cart
    sqlString ="SELECT cart_id, productname, productcost, cart_quantity " &_
    "FROM cart, products " &_
    "WHERE cart_userID= 'userID' " &_
    "AND cart_productID = 'productid' " &_
    "ORDER BY cart_id "
    SET RS = Con.Execute( sqlString )
    IF RS.EOF THEN
    %>
    <p><b>You do not have any items in your shopping cart</b>
    <p>
    <form action="default.asp">
    <input type="submit" value="Continue Shopping">
    </form>
    <%
    ELSE
    orderTotal = 0
    %>

  • #6
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Where do you set Con?

  • #7
    New to the CF scene
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft VBScript runtime (0x800A01A8)

    Quote Originally Posted by yapjiwen View Post
    Hi,

    Anybody knows why whenever I submit my form and insert my data into Access i get this error?

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

    The line that VBScript has detected an error (which im not quite sure there is) is line 290:

    conn.Execute "insert into CustomerParticularsDB(name,division,projectName, " _ ...

    There shouldnt be a problem with my codes as they have been tested before...This error came out just after I have added a header and left nav bar.... hope someone is able to help

    THanks alot.

    Have you got a solution for this. I have the same error and I dont' know how to solve it. Thanks.

  • #8
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft VBScript compilation (0x800A0401)..please help!!

    this is my coding..
    and i get this error..

    Microsoft VBScript compilation (0x800A0401)
    Expected end of statement
    /e-training/DailyRptTSB.asp, line 12, column 88
    sql ="SELECT * from Training where Company = 'TSB' AND StaffName='" &(rs("StaffName")) "' "
    ---------------------------------------------------------------------------------------^


    <%@ Language=VBScript %>
    <!--#include file="connection.asp"-->

    <%

    sql ="SELECT DISTINCT StaffName from Training where Company = 'TSB' "
    SET RS = Conn.Execute(sql)

    %>
    <%

    sql ="SELECT * from Training where Company = 'TSB' AND StaffName='" &(rs("StaffName"))& "' "
    SET RS6 = Conn.Execute(sql)

    %>
    <%

    sql ="SELECT CourseStatus from Training where Company = 'TSB' "
    SET RS1 = Conn.Execute(sql)


    %>

    <%

    sql ="SELECT CourseStatus from Training where Company = 'TSB' "
    SET RS1 = Conn.Execute(sql)

    %>
    <%
    sql ="SELECT CourseName from Training where Company = 'TSB' "
    SET RS2 = Conn.Execute(sql)
    %>
    <%

    sql ="SELECT OrganizerName from Training where Company = 'TSB' "
    SET RS3 = Conn.Execute(sql)

    %>
    <%

    sql ="SELECT Quarter from Training where Company = 'TSB' "
    SET RS4 = Conn.Execute(sql)

    %>
    <%

    sql ="SELECT EstiCost from Training where Company = 'TSB' "
    SET RS5= Conn.Execute(sql)

    %>


    <%Response.ContentType = "application/vnd.ms-excel"%>




    <style type="text/css">
    <!--
    body,td,th {
    font-family: Arial;
    }
    .style11 {
    font-size: 10px;
    font-weight: bold;
    }
    .style12 {font-size: 10px}
    .style15 {color: #00CC66}
    -->
    </style>






    <table width="1469" border="1" cellpadding="0" cellspacing="0">
    <tr>
    <td width="61" height="16" bgcolor="#CCCCCC" class="xl22"><div align="center"><span class="style11">No </span></div></td>
    <td bgcolor="#CCCCCC" width="109" class="xl22"><div align="center"><span class="style11">Name </span></div></td>
    <td bgcolor="#CCCCCC" width="126" class="xl22"><div align="center"><span class="style11">Position </span></div></td>
    <td bgcolor="#CCCCCC" width="41" class="xl22"><div align="center"><span class="style11">A </span></div></td>
    <td bgcolor="#CCCCCC" width="46" class="xl22"><div align="center"><span class="style11">B </span></div></td>
    <td bgcolor="#CCCCCC" width="56" class="xl22"><div align="center"><span class="style11">C </span></div></td>
    <td bgcolor="#CCCCCC" width="17" class="xl22"><div align="center"><span class="style11">= </span></div></td>
    <td bgcolor="#CCCCCC" width="49" class="xl22"><div align="center"><span class="style11">TD </span></div></td>
    <td bgcolor="#CCCCCC" width="57" class="xl22"><div align="center"><span class="style11">TR </span></div></td>
    <td bgcolor="#CCCCCC" width="34" class="xl22"><div align="center"><span class="style11">Status </span></div></td>
    <td bgcolor="#CCCCCC" width="50" class="xl22"><div align="center"><span class="style11">Training Proposed </span></div></td>
    <td bgcolor="#CCCCCC" width="69" class="xl22"><div align="center"><span class="style11">Organizer </span></div></td>
    <td bgcolor="#CCCCCC" width="114" class="xl22"><div align="center"><span class="style11">Proposed Date </span></div></td>
    <td bgcolor="#CCCCCC" width="86" class="xl22"><div align="center"><span class="style11">Esrtmated Cost </span></div></td>
    <td bgcolor="#CCCCCC" width="96" class="xl22"><div align="center"><span class="style11">Total Budget </span></div></td>
    <td bgcolor="#CCCCCC" width="102" class="xl22"><div align="center"><span class="style11">Actual Cost </span></div></td>
    <td bgcolor="#CCCCCC" width="103" class="xl22"><div align="center"><span class="style11">Balance Budget </span></div></td>
    <td bgcolor="#CCCCCC" width="56" class="xl22"><div align="center"><span class="style11">Notes </span></div></td>
    <td bgcolor="#CCCCCC" width="56" class="xl22"><div align="center"><span class="style11">TIF </span></div></td>
    <td bgcolor="#CCCCCC" width="50" class="xl22"><div align="center"><span class="style11">TEF </span></div></td>
    <td bgcolor="#CCCCCC" width="47" class="xl22"><div align="center"><span class="style11">TEF6 </span></div></td>
    </tr>
    <% 'cycle thru the record set and display each row results
    do until rs6.EOF
    bil=bil+1
    %>
    <tr>
    <td height="50" class="style11"><div align="center" class="style11 style15">&nbsp;
    <div align="center"><%=bil%>&nbsp;</div>
    </div></td>
    <td class="style11"><div align="center" class="style11">&nbsp;
    <div align="center"><%= rs("StaffName")%>&nbsp;</div>
    </div></td>
    <td class="style11"><div align="center" class="style11">&nbsp;
    <div align="center"><%= rs6("SPosition")%>&nbsp;</div>
    </div></td>
    <td bgcolor="#FFCC00"class="style11"><div align="center" class="stle11">&nbsp;
    <div align="center">
    <%
    'strbln = Request("strbln")
    'strBranch = Request("strBranch")
    'strYear = Request("strYear")

    Set rsCount= Server.CreateObject("ADODB.Recordset")
    CountSql = " SELECT TrainingStatus FROM Training WHERE TrainingStatus='Planning' AND Company = 'TSB'"
    rsCount.open CountSql, conn,1,3
    response.write "" & rsCount.RecordCount
    %>&nbsp;
    </div>
    </div></td>
    <td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <%
    'strbln = Request("strbln")
    'strBranch = Request("strBranch")
    'strYear = Request("strYear")

    Set rsCount1= Server.CreateObject("ADODB.Recordset")
    CountSql = " SELECT TrainingStatus FROM Training WHERE TrainingStatus='Approved' AND Company='TSB'"
    rsCount1.open CountSql, conn,1,3
    response.write "" & rsCount1.RecordCount
    %>&nbsp;

    </div>
    </div></td>
    <td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <%
    'strbln = Request("strbln")
    'strBranch = Request("strBranch")
    'strYear = Request("strYear")

    Set rsCount= Server.CreateObject("ADODB.Recordset")
    CountSql = " SELECT TrainingStatus FROM Training WHERE TrainingStatus='Decline'"
    rsCount.open CountSql, conn,1,3
    response.write "" & rsCount.RecordCount
    %>&nbsp;
    </div>
    </div></td>
    <td bgcolor="#000000" class="style11"><div align="center"><span class="style12"><strong>&nbsp;
    </strong></span></div></td>
    <td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <%
    'strbln = Request("strbln")
    'strYear = Request("strYear")

    Set rsCount= Server.CreateObject("ADODB.Recordset")
    CountSql = " SELECT TrainingStatus, CourseName FROM Training WHERE TrainingStatus='Approved' OR TrainingStatus='Done' AND company ='TSB'"
    rsCount.open CountSql, conn,1,3
    response.write "" & rsCount.RecordCount
    %>&nbsp;
    </div>
    </div></td>





    <td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <%
    'strbln = Request("strbln")
    'strYear = Request("strYear")

    Set rsCount= Server.CreateObject("ADODB.Recordset")
    CountSql = " SELECT CourseName FROM Training WHERE company ='TSB'"
    rsCount.open CountSql, conn,1,3
    response.write "" & rsCount.RecordCount
    %>&nbsp;
    </div>
    </div></td>

    <td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">
    <% 'cycle thru the record set and display each row results
    do while not rs1.EOF %>
    <%= rs1("CourseStatus")%><br>
    <%'increment record position with MoveNext method
    rs1.MoveNext
    loop
    'close connection and flush objects from memory
    rs1.Close
    set rs1 = Nothing %>
    </div></td>
    <td class="style11"><div align="center">
    <% 'cycle thru the record set and display each row results
    do while not rs2.EOF %>
    <%= rs2("CourseName")%><br>
    <%'increment record position with MoveNext method
    rs2.MoveNext
    loop
    'close connection and flush objects from memory
    rs2.Close
    set rs2 = Nothing %>
    </div></td>
    <td class="style11"><div align="center">
    <% 'cycle thru the record set and display each row results
    do while not rs3.EOF %>
    <%= rs3("OrganizerName")%><br>
    <%'increment record position with MoveNext method
    rs3.MoveNext
    loop
    'close connection and flush objects from memory
    rs3.Close
    set rs3 = Nothing %>
    </div></td>
    <td class="style11"><div align="center" class="style11">
    <div align="center" class="style11">
    <div align="center">
    <div align="center" class="style11">
    <div align="center" class="style11">
    <div align="center">&nbsp;
    <% 'cycle thru the record set and display each row results
    do while not rs4.EOF %>
    <%= rs4("Quarter")%><br>
    <%'increment record position with MoveNext method
    rs4.MoveNext
    loop
    'close connection and flush objects from memory
    rs4.Close
    set rs4 = Nothing %>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div></td>
    <td class="style11"><div align="center" class="style11">
    <div align="center" class="style11">
    <div align="center" class="style11">
    <div align="center">
    <% 'cycle thru the record set and display each row results
    do while not rs5.EOF %>
    <%=FormatNumber(rs5("estiCost"),2)%><br>
    <%'increment record position with MoveNext method
    rs5.MoveNext
    loop
    'close connection and flush objects from memory
    rs5.Close
    set rs5 = Nothing %>
    &nbsp;</div>
    </div>
    </div>
    * *</div></td>
    <td class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <% Dim Budget1
    Budget1 = 0
    sql = "SELECT * from Training WHERE Company='TSB'"
    SET RS1= Conn.Execute(sql)
    While Not RS1.EOF
    If Not IsNull(RS1("EstiCost")) Then
    Budget1 = Budget1 + CSng(RS1("EstiCost"))
    End If
    RS1.MoveNext
    Wend
    Response.Write "" & FormatNumber(Budget1,2)

    %>
    &nbsp; </div>
    </div></td>
    <td class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <% Dim Budget2
    Budget2 = 0
    sql = "SELECT * from Training WHERE Company='TSB'"
    SET RSy= Conn.Execute(sql)
    While Not RSy.EOF
    If Not IsNull(RSy("CourseExpense")) Then
    Budget2 = Budget2 + CSng(RSy("CourseExpense"))
    End If
    RSy.MoveNext
    Wend
    Response.Write "" & FormatNumber(Budget2,2)

    %>
    &nbsp; </div>
    </div></td>
    <td class="style11"><div align="center" class="style11">&nbsp;
    <div align="center">
    <% Dim VARIANCE
    VARIANCE = 0
    VARIANCE=Budget1-Budget2
    Response.Write "" & FormatNumber(VARIANCE,2)


    %>
    &nbsp; </div>
    </div></td>
    <td class="xl22">&nbsp; </td>
    <td class="xl22">&nbsp; </td>
    <td class="xl22">&nbsp; </td>
    <td class="xl22">&nbsp; </td>

    </tr>
    <% rowCount = rowCount+1
    'increment record position with MoveNext method
    rs6.MoveNext
    loop
    'close connection and flush objects from memory
    rs6.Close
    set rs6 = Nothing %>

    </table>

  • #9
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You forgot an & before the last quote on that line.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #10
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi All , i got stuck with microsoft vbscript run time error 800A01A8
    it says object required: 'a.Document.getElementById(...)'
    in web page 10.188.102.115 there is link called COUNTER i want to click on that
    Please help me thanks in advance. below is my code

    Set a = CreateObject("InternetExplorer.Application")
    a.visible = True
    a.Navigate"10.188.102.115"
    wscript.sleep 7000
    a.Document.getElementById("COUNTER-anchor").click

  • #11
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    You say the link is called 'COUNTER' but your code refers to its id as 'COUNTER-anchor'.

    You might also need

    Code:
    a.window.document.getElementByID('...').click()
    Notice the brackets, click(), to trigger the event.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #12
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    This might be useful:

    Code:
    Set a = CreateObject("InternetExplorer.Application")
    a.Visible = True
    a.Navigate"10.188.102.115"
    While Not a.ReadyState = READYSTATE_COMPLETE ' or = 4
        wscript.sleep 500
    Wend
    
    Set theDoc = a.document
    theDoc.getElementByID('...').click()
    [I don't think you need to reference to window.document, just document.]
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •