Document circunstances under which `ResultSetMetadata::num_result_cols` and others error
Closed this issue · 3 comments
It seems that it requires the driver to provide incorrect information on them, but I am not sufficiently familiar with the code base (yet ^^)
You can try start here: https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlnumresultcols-function?view=sql-server-ver15 ;-)
Hello @jorgecarleitao ,
so finally I've a little bit time, to give a more elaborate answer. In general the ODBC functions have defined error states (and some drivers even stick to them. Not all though). Some of these are invalid state transitions, which users of the odbc-api
crate are unlikely to see, since most of them are prevented through usage of Rusts type system.
Others capture misconfiguration of drivers, or runtime errors, like out of memory or a loss of connection. Due to the wide range of data sources which can be wrapped as an ODBC data source, functions can also fail due to a "Generic Error".
In practice I've never seen num_result_cols
fail.
Hope this answers the quesion somewhat better.
Cheers, Markus
Personally I do not see yet, why the driver would be required to provide false information. That implies though, that I probably missed the point. On the other hand this is open for a month now, without moving forward. So I am closing this until interesst resparks.