right this is the system. its a questions naire.
all answers are yes or no simple
Users see first question are you a footballer
users answers no.
users sees next questions are you a basketballer
user answer no
are u a tennis player
users answer yes
and so
no i have a List<Quetion> that stores all the questions and answers as they get answered.
This is where the problem begins the next question from the DB is derieved from the previous questionid =qid in the above example and the answer = answer previous example.
So thats 2 parameters no problem. but then when it comes to the third question i need to get this question based on the first two answers so could be yes and no.
and they both get stored in the answer []
so thats the exact problem
What can i do
Thanks,
For the help so far
R8VI
Main Topics
Browse All Topics





by: DanielWilsonPosted on 2009-09-03 at 09:55:28ID: 25252554
Stored Procedures (under SQL Server at least) do not take variable numbers of parameters. You can declare optional parameters, but that will take you only so far. I get the idea you want, not just 4 parameters, but potentially LOTS of them. Basically, if you could pass the arrays to the SP, you would.
But you can't.
So ... can you explain the table structure and requirement so that we can come up with an alternate solution?