I use NLog to enter my application and as part of this, we register the client number, which is a string in C #, and varbinary (32) in the database. I am using the following SQL code for this particular parameter. The rest of the SQL statement works just fine:
CONVERT(varbinary(32), @CustNumber)
and the following NLog parameter:
<parameter name="@CustNumber" layout="${event-context:item=CustNumber}" />
and the following code in C # to add the Nlog parameter:
myEvent.Properties.Add("CustNumber", custNumber);
For some reason, the value stored in the actual table is only the first character of the string of the original client number. I checked double and triple to make sure that I do not truncate the row before it is sent to the database. Any help would be greatly appreciated.
Claytonhunt
source share