Android Question jRDC2 problem with SQL nvarchar(MAX) columns

Mostez

Well-Known Member
Licensed User
Longtime User
I use jRDC2.2 with MS SQL server 2012, I have column with type nvarchar(max) when I try to get data, I receive (RuntimeException) java.lang.RuntimeException: Cannot serialize object:

I debugged ExecuteQuery2 in jRDC, this line
B4X:
Dim ct As Int = rsmd.RunMethod("getColumnType", Array(i + 1))
returns 2005 if column type is nvarchar(max) or 12 if column type is sized to n number of chars say 2000, nvarchar(2000)
I set col size to 4000 to solve this problem for now, but I still need to fix it in jRDC cause I will face this problem with the rest of other tables!

table.jpgsized nvarchar.jpgnvarchar(max).jpg
 

Mostez

Well-Known Member
Licensed User
Longtime User
I added this line, it works ok, but don't know if is it 100% correct
B4X:
Else if ct = 2005 Or ct = 12 Then 'SQL nvarchar(max), sized nvarchar and varchar data types
row(i) = jrs.RunMethod("getString", Array(i + 1))
 
Upvote 1

OliverA

Expert
Licensed User
Longtime User
@aeric , @Mostez
Make a wish to have jRDC2 code updated to handle Clobs. This issue has been encountered more than once and it probably would be good if the base jRDC2 code would handle this case
 
Upvote 0
Top