AppendDoc function- doesnt seem to add the doc's in order?

using licensed version 2.1.5.0
using .Net 1.1

when creating a single document by appending multiple documents it doesnt appear to add the doc’s in the specified order

we have a grid on the page that contains 4 records, we loop through the grid, creating a document for each record then appending this to a destination document. we want the document to be ordered the same way as the grid but this doesnt happen and cant figure out why?

the function we use to append the doc is as follows:-

Private Sub AppendDoc(ByVal dstDoc As Document, ByVal srcDoc As Document)
Try
While srcDoc.Sections.Count > 0
Dim section As Section = srcDoc.Sections(0)
'The section must first be removed before it can be inserted into a document.
srcDoc.Sections.RemoveAt(0)
dstDoc.Sections.Add(section)
End While
Catch ex As Exception
Throw ex
End Try
End Sub

in the grid the records appear in the following order

Record ID
15727
15728
15729
15730

but when the document is displayed, they come out in the following order:-

15729
15730
15727
15728

i have even tried changing the AppendDoc function to use Insert instead of Add but this made no difference either.

any idea as to why this would happen
Cheers,
Craig

Hi
Thanks for your inquiry. I don’t think that this is problem of Aspose.Words. Could you please provide me simple code that will allow me to reproduce this problem? I mean code that you use to generate documents and your recordset. Also you can create sample application to demonstrate a problem.
Best regards.

yep your correct it isnt aspose!!

turns out there was an stored proc issue, thats causing it!!
sorry bout that!

Cheers,
Craig