[freetds] Support of SQL_WVARCHAR/nvarchar

James K. Lowden jklowden at freetds.org
Thu Oct 9 00:24:59 EDT 2008


marko68 GMX wrote:
> In my view, it is a bit strange that GetSQLTypeInfo() indicates that
> SQL_WVARCHAR is supported 

Does a successful return from GetSQLTypeInfo() indicate the type is
supported?  Or does it just indicate that type information was returned?  

> and the corresponding MS SQL UNICODE data
> type is "nvarchar", because any next attempt to use it immediately
> fails. Would not it make more sense for GetSQLTypeInfo() to fail when
> the info for SQL_WVARCHAR is requested

http://msdn.microsoft.com/en-us/library/ms714632(VS.85).aspx

Fail how?  

The only error code I found that might apply is HY004 "Invalid SQL data
type", which doesn't seem to fit.  Its description is:

	"The value specified for the argument DataType was neither a valid ODBC
SQL data type identifier nor a driver-specific data type identifier
supported by the driver."

and your input definitely *is* a valid datatype.  
 
--jkl


More information about the FreeTDS mailing list