The 2 jpgs are the same?

Anyway I now see you are using Pervasive.SQL and with old/new driver you mean the Pervasive.SQL ODBC driver. Not the DataFlex ODBC connectivity kit.
You are using embedded SQL (SQLExecDirect) to get data in a Pervasive.SQL database and that generates these errors.

Indeed not very helpful error texts and I can image it is hard to find out what the problem is. But these errors are generated by Pervasive.SQL, the ODBC driver just passes them back to DataFlex, so from the DataFlex side we can't really do much about it.