473,797 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.
/gwisbrandnewrea dy5/indvgrant2.asp, line 24

CODE:
<%@ Language=VBScri pt %>
<!--#include file="adovbs.in c" -->
<%Response.Buff er = True %>
<HTML>
<HEAD>
<META NAME="GENERATOR " Content="Micros oft Visual Studio 6.0">
</HEAD>

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

set CN=server.creat eobject("ADODB. Connection")
CN.Open myDSN
'cirRS stands for recordset corresponding to the resulting parameterized query
set cirRS=server.cr eateobject("ADO DB.Recordset")
cirRS.ActiveCon nection = CN

Dim sFiscalStaff
sFiscalStaff = Request.QuerySt ring("lstFiscal Staff")

SQL = "SELECT * from GMISExpenseComb o1 where FiscalStaffIntI D = " &
sFiscalStaff
'Response.Write SQL
cirRS.Open

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

<H4>
<font COLOR="red">Lis ting 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>Subgrant ID</th><th>Title"
%>
<%
do until cirRS.eof
Key = cirRS("IntID")
Subgrant = cirRS("ComboID" )
Title = cirRS("Title")
%>

<tr>
<td align="center">
<div style="cursor:h and"><p align="left"
OnClick="locati on.href='mainre portagain1.asp? GrantID=<%Respo nse.Write Key%>'">

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

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

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

<%
cirRS.MoveNext
loop
%>
<input type="button" value="Log Out" name="btn_LogOu t" >
<input type="button" value="IndvGran t" name="btn_IndSu bgrant">

</BODY>
</HTML>
Jul 22 '05 #1
2 5913
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.
/gwisbrandnewrea dy5/indvgrant2.asp, line 24

CODE:
<%@ Language=VBScri pt %>
<!--#include file="adovbs.in c" -->
<%Response.Buff er = True %>
<HTML>
<HEAD>
<META NAME="GENERATOR " Content="Micros oft Visual Studio 6.0">
</HEAD>

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

set CN=server.creat eobject("ADODB. Connection")
CN.Open myDSN
'cirRS stands for recordset corresponding to the resulting parameterized query
set cirRS=server.cr eateobject("ADO DB.Recordset")
cirRS.ActiveCon nection = CN

Dim sFiscalStaff
sFiscalStaff = Request.QuerySt ring("lstFiscal Staff")

SQL = "SELECT * from GMISExpenseComb o1 where FiscalStaffIntI D = " &
sFiscalStaff
'Response.Write SQL
cirRS.Open

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

<H4>
<font COLOR="red">Lis ting 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>Subgrant ID</th><th>Title"
%>
<%
do until cirRS.eof
Key = cirRS("IntID")
Subgrant = cirRS("ComboID" )
Title = cirRS("Title")
%>

<tr>
<td align="center">
<div style="cursor:h and"><p align="left"
OnClick="locati on.href='mainre portagain1.asp? GrantID=<%Respo nse.Write Key%>'">

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

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

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

<%
cirRS.MoveNext
loop
%>
<input type="button" value="Log Out" name="btn_LogOu t" >
<input type="button" value="IndvGran t" name="btn_IndSu bgrant">

</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
1597
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
2672
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 CommandBuilder (or is it data adapter) object. Here is my code (the books code, actually): <%@ Page Language="VB" %> <%@ Import Namespace="System.Data" %>
3
2442
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 object :(((( Anyone pls help me to solve this problem!!! thanks in advance,
0
2038
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 completion of the operation or the server is not responding. It seems that the download file code is executing before letting the previous code to finish. Even the message print code (message.Text="...";) is not executed.
3
2386
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 Maritz.Learning.HP.Callcenter.BusinessServices.Searchs(base.ConnectionString); searchs.Search(this.FirstNameTextbox.Text, this.LastNameTextbox.Text,
0
3588
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 OleDbParameterCollection" whenI try to write a new record. Delete and Modify work fine its just the add record function causes the error.
21
6898
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
4035
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 status value. Error comes at ADODC.RECORDSET.UPDATE command.
2
8168
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; SELECT COUNT(*)INTO TOTAL_LEFT FROM DBSAMBA.REPORTEDTRANSACTION_S; WHILE (TOTAL_LEFT > 0) DO
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9536
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10468
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.