Search code examples
oledbvisual-foxpro

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?


Solution

  • 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'