Hi,
In my b4j server application I am trying to connect SQL server and execute an stored procedure that returns a NVARCHAR(MAX) in output param.
But I only recieve the first 2000 bytes (utf) of the result string.
According to this page https://developer.android.com/reference/java/sql/Types
I should use type -16 LongNvarChar which is not supported by jSQL library. So I use data type -1 ( LongVarChar)
How can I have the unlimited length of NvarChar(Max) which is returned by SQL serever?
In my b4j server application I am trying to connect SQL server and execute an stored procedure that returns a NVARCHAR(MAX) in output param.
But I only recieve the first 2000 bytes (utf) of the result string.
Here is the code:
Dim myResponse As String
Dim SQLconnection As SQL = SQLdb.myConnectionPool.GetConnection
Dim CallableStatement As JavaObject = SQLconnection.CreateCallStatement("exec [SP_myStoredProc] ?,?,?,? ", Array("Value_1", "Value_2", "Value_3", "" ))
CallableStatement.RunMethod("registerOutParameter", Array (4,-1))
CallableStatement.RunMethod("execute", Null)
myResponse = CallableStatement.RunMethod("getString",Array (4))
According to this page https://developer.android.com/reference/java/sql/Types
I should use type -16 LongNvarChar which is not supported by jSQL library. So I use data type -1 ( LongVarChar)
How can I have the unlimited length of NvarChar(Max) which is returned by SQL serever?