I need to run a stored procedure from code. One of the input parameters is rowVersion of the table. rowVersion is a byte array ( {0, 0, 0, 0, 0, 0, 13, 191} that's 0x0000000000000DBF in db). So if to add rowVersion this way :
cmd.Parameters.AddWithValue("@myPKRowversion", 0x0000000000000DBF);
my sp is working. But when I'm adding it like here:
uint a = 0x0000000000000DBF;
cmd.Parameters.AddWithValue("@myPKRowversion", a);
or if I convert byte Array to string like:
string a = "0x0000000000000DBF";
cmd.Parameters.AddWithValue("@myPKRowversion", a);
my sp is not working. What should I do to make my sp work?
uintonly represents 4 bytes, not 8.