Incomplete Error Message in System.Data.Odbc
Description
This seems to be related to #24148 in that the fix was the change DriverManagerEncoding in /Library/Vertica/ODBC/lib/vertica.ini to UTF-16 from the default of UTF-32. However, I opened a new issue because I'm running this on MacOS and the error message when I run some code like this:
using (OdbcConnection connection = new OdbcConnection(verticaConnection))
{
connection.Open();
}
is just:
ERROR [H] [
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
...
and the stack trace ends at the line for Open(). It's as if a large part of the error message gets truncated away.
Configuration
unixODBC 2.3.7
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /Users/mh039333/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
.NET Core SDK (reflecting any global.json):
Version: 3.1.401
Commit: 39d17847db
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.401/
Host (useful for support):
Version: 3.1.7
Commit: fcfdef8d6b
.NET Core SDKs installed:
3.1.100 [/usr/local/share/dotnet/sdk]
3.1.401 [/usr/local/share/dotnet/sdk]
Other information
I am able to open a connection to Vertica using ODBC without modifying the vertica.ini to change encodings if I use Rust's odbc = "0.17.0" crate. Not related to the error message at hand, but I wanted to point out that another ODBC implementation doesn't seem to trip over the encoding this way.
Tagging subscribers to this area: @roji, @ajcvickers See info in area-owners.md if you want to be subscribed.
There are similar encoding issues and incomplete error messages when using the Filemaker ODBC driver via System.Data.Odbc.OdbcConnection.Open and unixODBC. For the Mac, I know that things like Excel opt for iODBC over unixODBC, possibly because it handles character encoding more gracefully. I'll grab a trace when I get a moment.
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
This process is part of our issue cleanup automation.
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.
This process is part of our issue cleanup automation.