Please assist,
I have been getting this error whenever I pass values to a parameter using code similar to:
parameters.paramByName('ParamVal1').value := trim(TextBox1.Text);
parameters.paramByName('ParamVal2').value := trim(TextBox2.Text);
So, if one of the text boxes is blank, then the error:
The data types varchar and text are incompatible in the greater than or equal to operator
appears.
What could be wrong?
After Running the sqlprofiler as suggested below
exec sp_executesql N'Select * from BLOtherChargeDetails
where Field1 = @P1 and Field2 >= @P2 and Field2 <= @P3 and
Field3 >= @P4 and Field3 <= @P5 and
Field4 >= @P6 and Field4 <= @P7 and
Field5 = @P8
Order By Field2, Field3
',N'@P1 varchar(50),@P2 text,@P3 varchar(5),@P4 text,@P5 varchar(5),@P6 varchar(8),@P7 varchar(8),@P8 smallint','Value_P1','','ZZZZZ','','ZZZZZ','20130401','20130611',0
go