Posted on: 1/13/2015 12:57:58 AM | Views : 633

I have a method that execute store procedure and returns values of store proc. I have a VIN that in SQL is in VarBinary Type. I am not sure what can I use to get the value.

//Get Customer Product By CustomerID public Model.CustomerProduct Get_CustomerProduct(int Customer_ID) { Model.CustomerProduct model = null; string myConnection = System.Configuration.ConfigurationManager.ConnectionStrings[connectionName].ToString(); SqlDatabase db = new SqlDatabase(myConnection); int bufferSize = 100; byte[] outByte = new byte[bufferSize]; using (DbCommand command = db.GetStoredProcCommand("Get_Customer_Product")) { db.AddInParameter(command, "Customer_ID", DbType.Int32, Customer_ID); var result = db.ExecuteReader(command); try ...

Go to the complete details ...