473,406 Members | 2,336 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,406 software developers and data experts.

Web form gives no rows in parameter query

I have a stored procedure:

CREATE PROCEDURE jan.faq_mainframe (@type varchar(100))
as
SELECT
faq.id,
faq.question,
faq.answer,
faq.faqtimestamp,
faq.type
FROM
faq
where
faq.type = @type
order by
faq.faqtimestamp
GO

and I try to set the parameter value in Page_Load:

If Not Page.IsPostBack Then
SqlDataAdapter1.SelectCommand.Parameters("@type"). Value =
Request.Params("type")
SqlDataAdapter1.Fill(DataSet11)
DataBind()
End If

based on a call like:

href="mainframe.aspx?type=Printing"

Debugging shows that:

The Request.Params("type") gets the value 'Printing'
SqlDataAdapter1.SelectCommand.Parameters("@type"). Value stores the
value 'Printing'
SqlDataAdapter1.Fill(DataSet11) returns 1

But, no rows are returned!

When I run the query in sql query analyzer, rows are returned for @type
= 'Printing'.

I use VS Net 2003 and Win 2000.

The sqldataadapeter was set up using the wizard.

Any ideas what is wrong is very much appreciated.

Regards,

Jan Nordgreen

Jan 27 '06 #1
1 1153
Out of curiosity, what happens, after you call the Fill method, if you
look at

DataSet11.Tables(0).Rows.Count

Does the rows collection show a count?

Jan 27 '06 #2

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

Similar topics

3
by: Mike Cocker | last post by:
Hello, I'm quite weak at PHP, so I was hoping to get some help understanding the below code. First off, I'm trying to create a "query form" that will allow me to display the results on my...
0
by: Morten Gulbrandsen | last post by:
Dear MySQL developers, Could some experienced Database developer please take a look at this ? It is supposed to be plain SQL2. How can it be coded under MySQL Especially all referential...
1
by: Tyson | last post by:
Hi Very novice sorry. Trying to add a simple query to a textbox...I am getting Enter Parameter Value I have a Form called (frm_tbl_RR_Datacapture). With a series of Textboxes. I am wanting...
3
by: dhowell | last post by:
I have a form that has two sub forms. I would like to use the current value of one of the subform fields as a search parameter in a query. I tried pointing to the name of the form/field within...
0
by: Rogelio Moreno | last post by:
Ohhhh, You are talking about web form. Sorry I was thinking about Win Form. Rogelio >-----Original Message-----
2
by: fstenoughsnoopy | last post by:
I have a customer order database and I need to pull a customers information, ie first name, last name, address, city, state, zip, phone, etc, into the oder table. i don't know how to go about...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
18
by: sweeneye | last post by:
Hi, I'm basing a query on the variables used in a form. The database contains lots of problems, say with a computer and a tick box for the apropriate component like monitor, keyboard, mouse etc....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.