help with query

Results 1 to 2 of 2

Thread: help with query

  1. #1
    Join Date
    Dec 1969

    Default help with query

    I have the following stored proc:<BR><BR>@somevariable varchar(50)<BR><BR>select * from sometable<BR>where somefield IN(@somevariable)<BR><BR><BR>If I want to base my select on several values from my aspx page can I just pass in the value as such:<BR><BR> cmd = new System.Data.SqlClient.SqlCommand ("sp_SomeProc");<BR> cmd.CommandType = System.Data.CommandType.StoredProcedure;<BR><BR> (cmd.Parameters.Add ("@somevariable", System.Data.SqlDbType.Int)).Value = "&#039;value1&#039;,&#039;value2&#039;,&#039;value 3&#039;";<BR><BR><BR>Thanks in advance for any help offered.<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default See this KB article..

    Search for articles by "Dutch".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts