Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Sort

Author  Topic 

saidev
Posting Yak Master

101 Posts

Posted - 2006-08-30 : 14:37:00
Hi Guys,

I have 5 Drop Down Combo boxes( dd1,dd2,dd3,dd4,dd5) and each has 25 items in it. I need to present the data in the DataGrid based
on the User Selection. Can you guys help me with the Query. By the way i am using VB.NET/ASP.NET. Appreciate Your help.
Thanks,

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2006-08-30 : 14:58:30
hmm. can you hook us up with what the table(s) look like
and what info you are going to pass to the proc?

________________________________________________
I am a man, I can change, if I have to, I guess.
Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-08-30 : 15:02:59
if u select all 5 what do u want ?
if u select some of the combos what do u want as O/P

Do u want the Stored Proc or how to pass the parameters from ur application or both ?



Srinika
Go to Top of Page

saidev
Posting Yak Master

101 Posts

Posted - 2006-08-30 : 15:56:10
Hi Srinika,

There is only one table "tblmovies". I want to present the Data in the Data grid based on the User Selection. If the user selects only 2 combos then i want to present only that data or if the user selects all the combos then i want to present all the selected data.
Can you help me with both Stored Proc and how to pass the parameters from my application. By the way i am using VB.NET/ASP.NET Appreciate your help
Thanks,
Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-08-30 : 16:14:38
>> If the user selects only 2 combos then i want to present only that data
does that mean only 2 fields? or
all the fields which satisfying the condition ? (if this is the case where clause with "AND" or "OR") ?


Srinika
Go to Top of Page

saidev
Posting Yak Master

101 Posts

Posted - 2006-08-30 : 16:35:24
Hi Srinika,
I will give the detail explanation. Please see below.
I have 5 Drop Down Combos and each combo contains the same data. that is

P1849AA
P1849Shr
P1834Shr
P1217Shr
M1849AA
M1217Shr
F1834Shr
M1217AA



If the User selects the "P1849AA" in first combo and "P1849Shr" in Second Combo then i need to display only these two fields
in the Datagrid. If the User Selects one item in each combo then i need to display all the fields in the grid. can you help me with this
all these data is coming from only one table that is "tblmovies". Appreciate your help
Thanks,


Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-08-31 : 06:43:05
I'm a bit confused on ur Q:
Is it on
1. The way to create the query to handle the selections (all or some fields to be displayed) ?
(If this is the case, u can use dynamic SQL)
or
2. How to get data, to a "ASP.Net DataGrid", by using some selection criteria ?
(If this is the case, u may have to start from one corner & proceed)

Srinika
Go to Top of Page
   

- Advertisement -