Using ODBC with a data control
Posted in 1995
Here's my problem.
I have a data control that I have connected to an Informix database using
an ODBC driver. This data control is linked to a truegrid control. I
want to be able to sort the data control by surname and I am using the
following SQL Statement.
SELECT account.title, account.forename, account.surname
FROM account
ORDER BY account.surname;
When this SQL is executed I get the error message
ODBC Call failed: ORDER BY column (surname) must be in SELECT list
I think the problem might be to do with the way Visual Basic interprets
the SQL. I know when you create a dynaset or snapshot you can parse the
DB_SQLPASSTHROUGH parameter which allows the ODBC driver to deal with the
SQL. How do I do the same thing in a data control.