sql.GetPartMasterPicsQry=SELECT PartMasterPics.Pmp_PictureName, PartMasterPics.Pmp_Notes, PartMasterPics.Pmp_PrintOnTrav FROM PartMasterPics WHERE (((PartMasterPics.Pmp_PmLinkID)=?)) ORDER BY PartMasterPics.Pmp_SortOrder;
Returns:
The first and last field are fine. I have no idea what to do with the second. It should be returning a line or so of text.
here is the relevant code:
B4X:
Dim result As DBResult = reqManager2.HandleJob(Job)
If result.Tag = "GetPartMasterPicsQry" Then
For Each records() As Object In result.Rows
PicsList.AddTwoLines2(records(0), records(1), records(0))
Next
End IF
The field in SQL Server is nvarchar(MAX). Perhaps the easiest thing to do is CAST it to a regular text in the query?
Interesting, I solved the problem by changing the query and Changing the return field type:
B4X:
SELECT PartMasterPics.Pmp_PictureName, Cast(PartMasterPics.Pmp_Notes AS nvarchar(100)), PartMasterPics.Pmp_PrintOnTrav FROM PartMasterPics WHERE (((PartMasterPics.Pmp_PmLinkID)=19890)) ORDER BY PartMasterPics.Pmp_SortOrder;
But I would still like to know how to handle very long note fields in the future.