I am trying to pass a timestamp to sql server where clause but it's not working due to incompatible type.
Can anyone help me? pls..
sqlCmd.Parameters.Add(new SqlParameter("@Timestamp", "0x000000253A0B0FE2"));
I am trying to pass a timestamp to sql server where clause but it's not working due to incompatible type.
Can anyone help me? pls..
sqlCmd.Parameters.Add(new SqlParameter("@Timestamp", "0x000000253A0B0FE2"));
The problem was due to incorrect data types in C# code. Below is the fixed code...
byte[] _timeStamp = BitConverter.GetBytes(0x0);
sqlCmd.Parameters.Add(new SqlParameter("@Timestamp", _timeStamp));
_timeStamp = (byte[])ds.Tables[2].Rows[0][0];