P
Patrick.O.Ige
I have a parameter below and i'm passing the value via Store procedure
Cmd.Parameters.Add(New SqlParameter("@ProductID", SqlDbType.Int, 1)).Value =
104
But as you can see the value "104" is hard coded..
My problem is on the same page i have a CHECKBOXLIST which is DAtabinded
and the DataValuefield i binded it to increments 1,2,3... which is p_id(I'm
doing that becos i need to pass those values)
My table looks like this :-
p_id ProductId chkText
1 104 Bank
2 104 Phone
My problem is i want to retrun the value 104 and not hard code it
there.Would it possibe to query the table like using:-
select TOP 1 productid from ProductFeatures which just returns value "104"
and append it to the Sqlparameters above.
any ideas?
Cmd.Parameters.Add(New SqlParameter("@ProductID", SqlDbType.Int, 1)).Value =
104
But as you can see the value "104" is hard coded..
My problem is on the same page i have a CHECKBOXLIST which is DAtabinded
and the DataValuefield i binded it to increments 1,2,3... which is p_id(I'm
doing that becos i need to pass those values)
My table looks like this :-
p_id ProductId chkText
1 104 Bank
2 104 Phone
My problem is i want to retrun the value 104 and not hard code it
there.Would it possibe to query the table like using:-
select TOP 1 productid from ProductFeatures which just returns value "104"
and append it to the Sqlparameters above.
any ideas?