Operator/operand type mismatch
问题 I'm using the Visual FoxPro OLE DB provider to query a VFP DB and I'm getting: System.Data.OleDb.OleDbException 'Operator/operand type mismatch` What could I be doing wrong? 回答1: In my where clause I had an int on one side and a char(15) on the other side Table Schema id int Query SELECT * FROM [some-table] WHERE id = 'some string' 回答2: In my case to avoid such kind of inconveniences I do the following I hope it works for you: var_name = iif(vartype(var_name)=='N',var_name,Val(var_name)) so