I have a strange problem which I have been discussing for some time with SAS support. Now we are playing Support Ping-Pong. They say it is the driver but it works for other applications, including R. Has anyone else seen this? I have SAS 9.4M5 64-bit on Windows 10 (64-bit Intel) connecting via ODBC (64-bit of course) to SAP SQL Anywhere. SAS is using utf-8 encoding. I can connect and read the table schemas (oddly with lengths 3x database column width). I can read tables with only numeric columns. I can read tables with some text columns of even width. Any tables which contain even one text column with an odd width: 1, 3, 5 characters etc. throw an ODBC error: ERROR: CLI column bind error: [SAP][ODBC Driver]Invalid string or buffer length. My investigation indicates that this is a well-known problem in ODBC caused by the buffer memory for the columns not being aligned according to the processor architecture restrictions, which would be on a 2 or 4 byte boundary. It is possible that the SAP SQL Anywhere driver implements (for portability reasons) a stricter alignment rule than other manufacturers' ODBC drivers. Interestingly, this occurs only when SAS uses utf-8 encoding, not in Wlatin1. That would mean that the ODBC driver is in UNICODE wide mode. I want to join the rest of the world in using Unicode so I can display international characters from our database, including Polish and Cyrillic, which are not in Wlatin1. Has anyone else seen this? Alternatively, has anyone proof that the scenario I describe above works for other ODBC drivers? Thanks. Peter Lancashire
... View more