473,378 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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?Grant ID=<%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>
Jul 22 '05 #1
2 5883
I got the solution to the problem.
I forgot to write cirRS.Open SQL
Instead I wrote cirRS.Open.
Thanks. Regards.
"Jack" wrote:
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?Grant ID=<%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>

Jul 22 '05 #2
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...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Patrick.O.Ige | last post by:
What could cause the error:- System.NullReferenceException: Object reference not set to an instance of an object. Any ideas?
3
by: Jim in Arizona | last post by:
I'm doing my best to learn ASPNET from a book devoted to ASPNET 1.0. So far, I haven't run into any problems, until now. This is a simple page that should just show the sql strings created by the...
3
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an...
0
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to...
3
by: Doug Durrett | last post by:
I'm having an issue and wanted to pass it by everyone to see what you think. Here is my code. //Code Start searchs = new...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
21
by: one2001boy | last post by:
PostMessage() function returns ERROR_NOT_ENOUGH_QUOTA after running in a loop for 700 times, but the disk space and memory are still big enough. any suggestion to resolve this problem? thanks.
4
neo008
by: neo008 | last post by:
Hi all, Finally gave up and putting it here. I am new to visual basic stucked up with an error- Run time errors.'-2147217887 (8004021)': Multiple-step operation generated errors. check each...
2
by: kya2 | last post by:
I am not able to create following store procedure. CREATE PROCEDURE DBSAMBA.InsertDeleteBatch(OUT norows INT ) RESULT SETS 1 LANGUAGE SQL BEGIN part1 DECLARE TOTAL_LEFT INT DEFAULT 0; ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.