[Imported] ODBC Linked Table does not support NVARCHAR(MAX) from SQL
>>Message imported from previous forum - Category:Scripts and Tips<< User: mchartrand, originally posted: 2018-10-23 17:25:39 Id:179 This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.
**_AFK: We have CS2017R2 and we have a linked ODBC table to SQL server. This all works fine, however one of the fields in our SQL table is set to type NVARCHAR(MAX) and contains about 4000 characters in it. The ODBC driver on our ClearSCADA server is the latest driver from microsoft (ODBC driver 17), and when we create a table in a ClearSCADA mimic to show the data, all fields show except for the NVARCHAR(MAX) one....it only shows the column names but does not return the data. Even if we only put say 20 characters in the field in SQL, it still does not appear in ClearSCADA. Any ideas?_**
sbeadle: Some field types just don't map into ClearSCADA types. Perhaps create a VIEW on this table for the linked table?
**_AFK: Thanks, but what field data type (containing a few thousand characters) could i create in the SQL view that would work on Clearscada?_**
sbeadle: I believe there may be a limit of 2000 chars - could you create and try a field of limited size?
**_AFK: Thanks, we have tried this with NVARCHAR(MAX) and no character length works at all. The NVARCHAR(2000) will work, but defeats the purpose as our fields will always be greater than 2000 characters. Looks like its a CS limitation that we cant work around for now. thanks for you help._**