473,387 Members | 1,650 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,387 software developers and data experts.

Query error?

Expand|Select|Wrap|Line Numbers
  1. <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
  2.                                 ConnectionString="<%$ ConnectionStrings:foodcourtConnectionString %>" 
  3.                                 SelectCommand="SELECT [foodname], [foodimg], [price], [stallid] FROM [foodtbl] WHERE ([stallid] = @stallid)">
  4.                                 <SelectParameters>
  5.                                     <asp:QueryStringParameter DefaultValue="<%=Session["stallid"] %>" Name="stallid" 
  6.                                         QueryStringField="stallid" Type="Decimal" />
  7.                                 </SelectParameters>
  8.                             </asp:SqlDataSource>
I having problem on the DefaultValue part. Kenot get the Session["stallid"]. Error there... Anyone can help..?
Aug 20 '10 #1
2 981
If your using the Session variable to get the DefaultValue, why don't you try using a session parameter? I'm not quite sure that you can use the Session variable like that as the default value(could be wrong)
Aug 20 '10 #2
Yes. I get the solution already. It is as what you mention; benwizzle

Expand|Select|Wrap|Line Numbers
  1. <SelectParameters><asp:SessionParameter Name="stallid" SessionField="stallid" DefaultValue="" /></SelectParameters>
Aug 20 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stijn Goris | last post by:
I get an error when trying to insert a new row: query error- 5 - Duplicate entry '80.200.213.102 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser ; MyIE2; .NET CLR 1.0.' for key 1...
2
by: Jim Hatfield | last post by:
I'm using: "select min(objid) from table_name where objid > $objid" to select the next row in a sequence where there may be gaps. It works fine unless the where clause results in an empty set. ...
1
by: Dalan | last post by:
I can't seem to find a workaround of Query Syntax Error. Actually, the query performs just fine, except when the last record on a related subform is deleted, then it generates a Runtime Error 3075...
2
by: Jean | last post by:
Hello everyone, I was having the following problem with a query, and after failing to find a similar solution on these newsgroups I decided to post here. I am quite new to Access, so would...
3
by: jallegue | last post by:
I am working with MS-Access 2002. The two tables that I am working with are: dbo_IDX_FRS_account_bal_by_month ==> this is a linked table to SQL == local table The query that is executed is...
14
by: Tom | last post by:
Using AccessXP in 2000 mode. I have the following tables --- TblLocation LocationID PropertyID StateID CountyID CityID
5
by: Annie | last post by:
hello guys, I have little experience working with C# and MS Access ... I am having an insert query with one datetime field and a boolean and couple of text and number fields as below: ...
4
by: franc sutherland | last post by:
Hello, I am using Access 2003. I am having trouble trapping the "can't append all the records in the append query" error message when appending data to a query from a table which is linked to...
8
Cintury
by: Cintury | last post by:
The problem is I have a function that I've created and stored in a module. I call it as an expression (e.g. total: Function(parameter)). I'm receiving the error 3061: too few parameters, expected 1....
12
by: lupis | last post by:
I am creating a query to find unmatched rows between a local access table and an online MS SQL Server table based on the PK field ID. This is working without any flaws. My problems start when I run a...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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,...
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...

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.