>How does the parameter get sent?
>
>>I do add parameters through Parameter statement, but the parameter uses @ in its name, e.g.
>>
>>select top (1) devicetype from dbo.pmt_type where @CardNum between Range1 and Range2
>>
>>This is my query string. I used @ to put the whole string into 1 variable.
SqlCommand sqlCommand = new SqlCommand();
sqlCommand.CommandText = sqlStatement;
sqlCommand.CommandType = CommandType.Text;
sqlCommand.Parameters.Add("@CardNum", SqlDbType.Int).Value = CardNum;
If it's not broken, fix it until it is.
My Blog