Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Beta Preview
This is the forum to discuss the Wrox book ASP.NET 2.0 Beta Preview by Bill Evjen; ISBN: 9780764572869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Beta Preview 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 11th, 2007, 06:03 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default SqlDataSource Select Command

Hi all,

I am using SqlDataSource Class and when I'm adding the parameters for the stored procedure, it is throwing an exception that there is no parameters passed to parameters. I tried with adding the parameter as string value as well as the parameter object. My sample code to add the parameter is as follows. Can anybody tell me where I'm doing the mistake.

Parameter p = new Parameter("@UserType",TypeCode.Int32);
Parameter p1 = new Parameter("@ActiveStatus",TypeCode.Char);

p.DefaultValue = Convert.ToString(uType);
p1.DefaultValue = Convert.ToString(aStatus);
sdsFillGrid.SelectParameters.Add(p);
sdsFillGrid.SelectParameters.Add(p1);

Thanks and Regards,

Senthil Kumar M.
__________________
Thanks in advance.

Regards,

Senthil Kumar M.





Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL said: select command denied to user: 'root@ surendran MySQL 2 September 9th, 2010 12:27 AM
Changing SqlDatasource select command in codebehin mallikalapati ASP.NET 2.0 Professional 2 March 28th, 2008 08:02 AM
Change the Select Command of a DataAdapter from th Manolis_Perrakis ASP.NET 2.0 Basics 0 October 20th, 2006 10:56 AM
How to store "SELECT" command value? venkikrao VB.NET 1 March 16th, 2006 06:01 AM
Select Command jaucourt ADO.NET 8 January 28th, 2004 11:34 AM





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