cancel
Showing results for 
Search instead for 
Did you mean: 

recordset.SaveXML() in 8.8

Former Member
0 Kudos

Is anyone using

recordset.SaveXML()?

They did something in 8.8 and the XML now contains only the first 4 characters of the data in Note fields.

HELP!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All,

Thanks for answering,

The problem seems to be somewhere else.

Including:

"convert(nvarchar(max), [U_Z_NoteField])"

In the query results in only the first 4 chars of the field returned.

This happeneds both when using SvaeXML() and when accessing the data directly of the recordset.

Asher

Former Member
0 Kudos

I've encountered it before, for some reason the recordset doesn't like nvarchar(max). I'm afraid the only solution I found was to not use it - but it might be worth contacting SAP to let them know it's a bug that you'd like fixed.

Former Member
0 Kudos

Dear Asher,

njmog1 is right, try to cast your nvarchar(max) fields to sized fields, like cast(U_Z_NoteField, nvarchar(1024))

also, keep in mind, that SAPbobsCOM.Recordset object has few more limitations, follow to SAP Note #722337:

http://service.sap.com/sap/support/notes/722337

Hope, it'll help.

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Asher,

Works fine for me.

version of B1: 8.8 PL18

Did you use query to fill recordset?

give more details about your issue.

rasmuswulff_jensen
Active Contributor
0 Kudos

It is not a fix but in 8.8 they introduced a new GetFixedXML() that also give the data... It does not fix SaveXML but perhaps it does not have the issue and you can switch to it instead.