title: How to fix operand type clash : image is incomplate with varchar(max) in sql server
body: <p>I have created a user defined type (with script to CREATE) given below:</p>
  
  <pre><code>CREATE TABLE [dbo].[EmployeeMasters](
  [ID] [int] IDENTITY(1,1) NOT NULL,
  [EmployeeID] [varchar](max) NOT NULL,
  [EmployeeFName] [varchar](max) NOT NULL,
  [EmployeeLName] [varchar](max) NOT NULL,
  [Photo] [image] NOT NULL)
  </code></pre>
  
  <p>On the same database I have created a procedure that uses this type:</p>
  
  <pre><code>create PROCEDURE EmpQuli_INSERT @EmployeeID varchar(Max),@EmployeeFName VARCHAR(MAX), @EmployeeLName VARCHAR(MAX),@Photo IMAGE AS BEGIN DECLARE @NEWID VARCHAR(10);  
  
  DECLARE @PREFIX VARCHAR(MAX);
  
  SET @PREFIX = UPPER(SUBSTRING('STR',1, 3)) SELECT @NEWID = (@PREFIX + replicate('0', 3 -len(CONVERT(VARCHAR,N.OID + 1))) + CONVERT(VARCHAR,N.OID + 1)) FROM (SELECT CASE WHEN MAX(T.TID) IS null then 0 else MAX(T.TID) end as OID FROM (SELECT SUBSTRING(EmployeeID, 3, 1) as PRE_FIX,SUBSTRING(EmployeeID, 3, LEN(EmployeeID))as TID FROM EmployeeMasters) AS T WHERE T.PRE_FIX = @PREFIX) AS N
  insert into EmployeeMasters values(@NEWID,@EmployeeFName, @EmployeeLName,  @Photo);
   end
  </code></pre>
  
  <p>And I try to insert a value in c# I getting <strong><em>operand type clash : image is incomplate with varchar(max) in sql server</em></strong>
   The c# code is:</p>
  
  <pre><code>EmployeeFName.Value = textBox_emp_Fname.Text;
  EmployeeLName.Value = textBox_emp_Lname.Text;
  Photo.Value =img_arr1;
  
  AddEmployee.CommandText = "EmpQuli_INSERT @EmployeeFName, @EmployeeLName, @Photo";
  </code></pre>
  
  <p>I don't know who to fix it. Please help me because I have to submit my final year project on June first week but now I struggle this exception please help....  </p>