1

Re: xml report problem

This one is a bit esoteric, but worth a mention I think.

One of the many custom xml reports I have created failed today giving an error message to the effect that data in one or more fields would be truncated. The message was a simple dialog and of course gave no indication of which field, or which record was causing the problem. Annoyingly, execution of the xml report was halted at this point, so there was no way of examining the output to identify precisely which field/record was causing the problem. I realise that this may be because of restrictions on the way SQL perfoms the query, but it doesn't help with the debugging process.

As it happens I managed to partially fix the problem by increasing the field size of all of the four fields in the report which produce an output by means of a SQL function concatenating data (as is the case with designations). In my original xml report these four fields were all set as varchar(100), changing this to varchar(1000) allowed the report to finish without incident.

Curiously a brief scan through the output did not reveal any records in which any of the fields exceeded 100 characters so I remain at a loss. I think, but cannot be sure that it was a concatenated abundance  field as this tends to produce the longest strings. The most likely explaination then would seem to be that the concatenation function is introducing some white-space which is not immediately obvious.

Obviously the error was mine, but the debugging process was tedious to say the least (and rather hit and miss), since the report took a good few minutes to run and when it worked produced a lot of records to be looked through.

Not sure I can identify a change to recorder which would improve matters here, apart of course from changing the way truncation is handled, so that the report continues to run and then informs the user after the event that some data has been truncated, rather than stopping before it has...

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

2

Re: xml report problem

I bumped in to the same problem as Rob, but came up with a different solution. After checking fields for truncation I added:

set ansi_warnings off

just after the <SQL> tag

Ian

3

Re: xml report problem

Interesting thanks Ian

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre