J
Jonathan Lurie
I have a query.
da.SelectCommand.CommandText="Select * from Inventory where
InventoryType=@Type and Status in (@Status)"
da.SelectCommand.Parameters.Add("@Type", SqlDbType.Int)
da.SelectCommand.Parameters.Add("@Status", SqlDbType.VarChar)
I know how to set value for the Inventory Type parameter.
da.SelectCommand.Parameters("@Type").Value = 1
But when I set value for the status parameter it does no return the correct
data.
da.SelectCommand.Parameters("@Status").Value = "I, A"
What am I doing wrong. Please advise.
John
da.SelectCommand.CommandText="Select * from Inventory where
InventoryType=@Type and Status in (@Status)"
da.SelectCommand.Parameters.Add("@Type", SqlDbType.Int)
da.SelectCommand.Parameters.Add("@Status", SqlDbType.VarChar)
I know how to set value for the Inventory Type parameter.
da.SelectCommand.Parameters("@Type").Value = 1
But when I set value for the status parameter it does no return the correct
data.
da.SelectCommand.Parameters("@Status").Value = "I, A"
What am I doing wrong. Please advise.
John