We have ran into problems in the development of our ODBC driver, more precisely when tableau desktop tries to determine SQL compliance by preparing and running test queries. We are asking your kind help on the matter, since sadly we do not know how shall we react to those queries from the driver side in order to make tableau know that we couldn't run specific queries and so fort make it realize the driver's SQL compliance level without unexpected termination through the checking progress.
As a standard ODBC driver i assume from the documentation:
(please correct me on this one if its not true), if a query cannot be prepared, the driver shall give back sql_error :
Syntax error or access violation
*StatementText contained an SQL statement that was not preparable or contained a syntax error.
*StatementText contained a statement for which the user did not have the required privileges.
This error code seems to be not working for Tableau for us at least. We would really appreciate if anybody could let us know what error code should we return, or what should we do in order to be able to communicate SQL compliance to tableau desktop, besides tdc file method, which we already know about and use.
For the error codes of sqlprepare function i have tried to return most of them, but neither of them showed any change in tableau's behavior which resides to:
Tableau tries to run all test queries and for the ones that we give back sql_error, runs sqldiagrec and sqldiagfield to determine the error codes, however after running some queries and getting back errors it just gives out an error message notifying the user about that the underlying connection is not okay or lost.
First i thought that maybe this is because that the driver needs to at least give back sql_success results for some of the test queries so i implemented fake results for them, to make it comply and let tableau be able to fetch results, but this didn't solve the problem, since there were still queries i couldn't fake.
The only SQL commands that our driver can support right now @are basic select queries without aliases and sub-queries, but with where conditions.
SQL_DATA_SOURCE_READ_ONLY ( does tableau use this property? i couldn't find any clues about this one in my driver's logs )
SQL_SQL_CONFORMANCE ( i could find out that tableau gets this property however it seems it doesn't change the SQL compliance determination procedure )
We would be more then happy If you could correct, or provide any additional information about the matter,
Thank you for your precious time and help,