View Full Version : Microsoft VBScript runtime (0x800A01A8) Object required: "" ERROR
yapjiwen
01-26-2004, 08:28 AM
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.
:confused:
glenngv
01-26-2004, 08:51 AM
It seems that the connection object conn is not set. Can we see some relevant codes?
whammy
01-27-2004, 01:35 AM
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.
yapjiwen
01-27-2004, 02:41 AM
Thanks pple...the problem was with the conn...Thanks for the help!:o
amazon
06-08-2006, 05:06 PM
:mad: :mad: 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
%>
arnyinc
06-09-2006, 05:14 PM
Where do you set Con?
sherryqueen31
05-27-2008, 05:53 AM
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.
:confused:
Have you got a solution for this. I have the same error and I dont' know how to solve it. Thanks.
IraFashua
04-01-2009, 10:03 AM
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">
<div align="center"><%=bil%> </div>
</div></td>
<td class="style11"><div align="center" class="style11">
<div align="center"><%= rs("StaffName")%> </div>
</div></td>
<td class="style11"><div align="center" class="style11">
<div align="center"><%= rs6("SPosition")%> </div>
</div></td>
<td bgcolor="#FFCC00"class="style11"><div align="center" class="stle11">
<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
%>
</div>
</div></td>
<td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">
<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
%>
</div>
</div></td>
<td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">
<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
%>
</div>
</div></td>
<td bgcolor="#000000" class="style11"><div align="center"><span class="style12"><strong>
</strong></span></div></td>
<td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">
<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
%>
</div>
</div></td>
<td bgcolor="#FFCC00" class="style11"><div align="center" class="style11">
<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
%>
</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">
<% '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 %>
</div>
</div>
</div>
* *</div></td>
<td class="style11"><div align="center" class="style11">
<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)
%>
</div>
</div></td>
<td class="style11"><div align="center" class="style11">
<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)
%>
</div>
</div></td>
<td class="style11"><div align="center" class="style11">
<div align="center">
<% Dim VARIANCE
VARIANCE = 0
VARIANCE=Budget1-Budget2
Response.Write "" & FormatNumber(VARIANCE,2)
%>
</div>
</div></td>
<td class="xl22"> </td>
<td class="xl22"> </td>
<td class="xl22"> </td>
<td class="xl22"> </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>
whammy
04-01-2009, 05:44 PM
You forgot an & before the last quote on that line.
vBulletin® v3.8.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.