Hi,
currently we are using Powerbuilder 2017/R3 Build 1858 in connection with SQL-Server (2005 - 2017)! We defined a field with NVARCHAR(MAX) in a table. We try to select this field.
SQLNCLI9/10/11:
Regarding parameter PBMaxTextSize: field NVARCHAR(MAX) will be selected correclty if we set this parameter for value 1000000. But this client has been DEPRECATED since SQL-Server 2012!
SQLOLEDB/MSOLEDBSQL (direct connection) and ADO.Net (Namespace: System.Data.OleDB)
Parameter PBMaxTextSize does not exist and therefore the field will be cut after 32766 figures (not only in DW but also in Powerbuilder in general).
We tested this function with a select to this field in Powerbuilder under DATABSAE / ISQL Session (Select Field From Table). In ADO.Net even with error message:
When we tested the same Connect with C# (in Visual Studio), the field was selected correctly.
DBPARM (ConnectString):
SQLCA.DBParm = "PROVIDER='MSOLEDBSQL',DATASOURCE='ServerName','CommitOnDisconnect='No',PROVIDERSTRING='Database=Datenbase;App=MyApplication;DataTypeCompatibility=80'"
The parameter: DBTextLimit=xxx – will be ignored!
Does a parameter exist for Powerbuilder which will select the data fields correctly (maybe in Powerbuilder 2019)?
We also have tested in ADO.Net the Namespace: System.Data.Sqlclient. Here, the NVARCHAR(MAX) fields were selected correctly (like in SQLNCLI9/10/11), but we can not set the ApplicationName (the parameter will be irgnored --> App=/ApplicationName=/Application Name=/Application=/... with apostrophe / without apostrophe).
However, this parameter has to be set for our application.
Kindly support us in this matter.
Thanks,
Andreas