Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SQLdataSource with 2 parameters

Reply
Thread Tools

SQLdataSource with 2 parameters

 
 
drewdr@yahoo.com
Guest
Posts: n/a
 
      12-22-2005
I've got a LastName textbox and a FirstName textbox.

How do I make LastName mandatory, and FirstName optional ?

If I use Select..........Where (LastName=?) AND (FirstName=?)
i need input from both textboxes, and if I use OR- it is either.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sml0ZXNo?=
Guest
Posts: n/a
 
      12-22-2005
May be you can use something like
Select..........Where (LastName=?) AND (FirstName=?+%)

So if the first name is blank the query will get all the Firstnames

"" wrote:

> I've got a LastName textbox and a FirstName textbox.
>
> How do I make LastName mandatory, and FirstName optional ?
>
> If I use Select..........Where (LastName=?) AND (FirstName=?)
> i need input from both textboxes, and if I use OR- it is either.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Parameters and SQLDataSource =?Utf-8?B?RGFuaWVsIFIuIEgu?= ASP .Net 6 12-31-2009 11:31 AM
Setting Parameters for SqlDataSource control =?Utf-8?B?R3JlaWY=?= ASP .Net 0 06-23-2006 03:48 PM
modify SqlDataSource parameters in code behind? =?Utf-8?B?RGFiYmxlcg==?= ASP .Net 2 04-04-2006 02:47 PM
How to access parameters of SqlDataSource Kees de Winter ASP .Net 3 03-29-2006 10:33 AM
Modify SqlDataSource parameters before select =?Utf-8?B?TWFydGluIEJpc2Nob2Zm?= ASP .Net 5 10-25-2005 12:59 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57