Is there a configuration option in the datadirect driver for

Posted by koarl on 19-Jun-2018 09:28

In our company we use datadirect on a redhat 7 based installation of SAS to access data on a MSSQL server.

The MSSQL server provides UTF8, but columns are generally stored as type VARCHAR, which is not UTF8. Changing the type of VARCHAR columns to NVARCHAR in the database is not an option. It is also not feasible to create views that cast all VARCHAR columns to NVARCH on the MSSQL server.

Presently we are working around the problem by casting the columns in SAS code which works fine. Analysts wish to get rid of the casts in the code. They want transparent access to VARCHAR columns as if they were NVARCHAR.

Is there a way to achieve this by driver configuration?

All Replies

Posted by eugenel on 25-Jun-2018 07:34

I am not aware of such option. The VARCHAR to NVARCHAR conversion should be transparent to the app if it just wants it as varchar. In fetch, the app can always bind the data with SQL_C_CHAR. In insert, it can bind the C type as SQL_C_CHAR and the SQL type as SQL_NVARCHAR, which tells the driver to do the conversion. Did I miss your point?
 
Thanks,
Eugene
 

This thread is closed