Error in asp text: Command text not set for the command

J

Jack

Hi,
I am getting the above error in an asp page. Not sure why?
The error details is given below. I appreciate any insight
to the problem. Thanks.
The code is attached here. Line
24 is the SQL.open line.


Microsoft JET Database Engine (0x80040E0C)
Command text was not set for the command object.
/gwisbrandnewready5/indvgrant2.asp, line 24

CODE:
<%@ Language=VBScript %>
<!--#include file="adovbs.inc" -->
<%Response.Buffer = True %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>

<%
myDSN="Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\_______GWISBRANDNEWREADY5\GMISDATA.mdb"

set CN=server.createobject("ADODB.Connection")
CN.Open myDSN
'cirRS stands for recordset corresponding to the resulting parameterized query
set cirRS=server.createobject("ADODB.Recordset")
cirRS.ActiveConnection = CN

Dim sFiscalStaff
sFiscalStaff = Request.QueryString("lstFiscalStaff")

SQL = "SELECT * from GMISExpenseCombo1 where FiscalStaffIntID = " &
sFiscalStaff
'Response.Write SQL
cirRS.Open

%>
<BODY>
<div ALIGN="CENTER">
<big><big><font COLOR="navy">On-Line Grant Reporting System</font></big></big>

<H4>
<font COLOR="red">Listing Of Subgrants</font>
</H4>
</div>
<div align="center">


<%
Response.Write "<table border='1' width='80%' height='1' cellspacing='1' >"
Response.Write "<th>Key</th><th>SubgrantID</th><th>Title"
%>
<%
do until cirRS.eof
Key = cirRS("IntID")
Subgrant = cirRS("ComboID")
Title = cirRS("Title")
%>

<tr>
<td align="center">
<div style="cursor:hand"><p align="left"
OnClick="location.href='mainreportagain1.asp?GrantID=<%Response.Write Key%>'">

<u><font color="#0000FF">
<%Response.Write Key%></font></u></div></td>
<% 'this writes out the key%>
</td>

<td align='center'>
<font color="#000000">
<%Response.Write Subgrant%>

<td align='left'>
<font color="#000000">
<%Response.Write Title%>
</td>
</tr>

<%
cirRS.MoveNext
loop
%>


<input type="button" value="Log Out" name="btn_LogOut" >
<input type="button" value="IndvGrant" name="btn_IndSubgrant">

</BODY>
</HTML>
 
J

Jack

I got the solution to the problem.
I forgot to write cirRS.Open SQL
Instead I wrote cirRS.Open.
Thanks. Regards.
 
B

Bullschmidt

Jack,

Thanks for showing us what the answer was that you figured out!

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top