Wrox Programmer Forums
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 25th, 2011, 05:33 PM
Authorized User
 
Join Date: Feb 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple SelectParameters

Hey guys I need to set the field name and search value by QueryParameters.

Is this Possible? I can get the @searchDate to work but not @searchType.
I'd also like to set the operators in a variable too, but not that important.

If this isn't possible does anyone have a work-around?

<asp:AccessDataSource ID="ADSlessDateSearch" runat="server"
DataFile="~/App_Data/DAC.accdb"

SelectCommand="SELECT * FROM Library WHERE (@searchType &lt; @searchDate) ORDER BY LastRevised DESC">
<SelectParameters>
<asp:QueryStringParameter DbType="String" Name="searchDate"
QueryStringField="searchDate" />
<asp:QueryStringParameter DbType="String" Name="searchType"
QueryStringField="searchType" />
</SelectParameters>
</asp:AccessDataSource>





Similar Threads
Thread Thread Starter Forum Replies Last Post
SelectParameters and ControlParameter for Cross P zhuhhu ASP.NET 2.0 Basics 1 March 9th, 2007 07:58 AM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
Multiple ADO multiple user login Oracle9i jhay0721 Pro VB Databases 1 April 4th, 2005 11:23 AM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM
Updating multiple Rows from multiple fields in ASP vdm_nana SQL Server ASP 0 April 1st, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.