WinSQL » Knowledge base
|Subject:||ODBC driver bug related to table columns|
|Creation date:||2/23/12 9:09 AM|
|Last modified on:||12/13/18 12:00 PM|
SQLColumn VS SELECT * query
WinSQL uses several metadata functions in the ODBC driver to get information from the back-end database. One such method is getting column information for tables. There are two ways to get information about columns in a table:
- Using the SQLColumn function in the ODBC API
- Preparing a SELECT * FROM TableName query and analyzing the columns returned.
WinSQL uses both methods to get the meta data for columns in a table. The second method pull a couple of additional attributes that are not fetched by the first method alone.
Theoretically speaking, after preparing a SQL statement, the ODBC driver should be able to return the columns returned by a SELECT * query. In rare occasions, the driver returns columns for the previous query, which is a bug in the ODBC driver. When you run WinSQL in debug mode
it will log a WARNING a warning message complaining about this problem.
- Start WinSQL
- Click Open Data Folder under the File menu.
This will open Windows Explorer.
- Locate WinSQL.conf file and open it in any editor such
as Notepad. This file uses Windows INI format to store
- Add a new parameter called UseSQLColumnsToFetchFieldInfo
and set its value to true. The file after modification should
- Save the file and restart WinSQL
This parameter will cause WinSQL to only use the first method,
by-passing the bug in the driver
Add a comment to this document
Do you have a helpful tip related to this document that you'd like to share
with other users? Please add it below. Your name and tip will appear at the
end of the document text.