Hi,
I have class where it process all the vouchers and its transactions and place it in a XML document in a specified folder.We run this class in batch during month end or if any error occur in GL transactions.
Its running fine from past few years now its is getting error ed out. I have created a job and placed the code from the method in the class(Which is used to generate the XML).So i am taking a particular voucher with minimum of 5k transactions in it.But when i try to run that job it is stopping particularly at the count of 3783 records.
i could not find the reason why it is behaving like this. below is the example code which i am trying
str XML(Name UniqueId,Name FileId)
{
Lines Lines;
Header Header;
str xml;
System.Text.Encoding utf8;
System.Byte[] bytes;
object ftpo;
object ftpResponse;
System.Net.FtpWebRequest request;
System.Net.NetworkCredential credential;
System.IO.Stream requestStream;
InteropPermission permission = new InteropPermission(InteropKind::ClrInterop);
str UId,Pwd;
int i=1;
Table3 t2;
;
xml = "<XXXXX><MsgData>";
while select Header where Header.ProcessID == "XXXXXXXX" && Header.FILEID == "XXXXXXX"
{
xml = xml + '<XXXX><XXXXX class="R">';
xml = xml + "<XXXXX>1</XXXXX>";
xml = xml +"<XXXX>"+(Header.FILEID)+"</FILEID>";
xml = xml + "<ID>" + (Header.ID) + "</ID>";
xml = xml + "<XXX>" +(Header.DATE) + "</DT>";
xml = xml + "<BUSINESS_UNIT>" + (Header.UNIT) + "</NIT>" ;
xml = xml + "<XXXX>"+(Header.XXXXX)+"</XXXXX>";
xml = xml + "<YYYY>"+(Header.YYYY)+"</yyyy>";
xml = xml + "<ZZZZ></ZZZZZ>";
xml = xml + "<CCCCC>"+(Header.CCCCC)+"</CCCCC>";
xml = xml + "<CCCC>"+(Header.CCCC)+"</CCCCC>";
XML feilds
.
.
.
.
.
.
.
while select Lines order by LINECOUNT where Lines.FILEID == Header.FILEID
&& Lines.JID == Header.JID
&& Lines.JDATE == Header.JDATE
&& Lines.ProcessID == "XXXXXX"
{
i++;
ttsbegin;
t2.Field1 = i;
t2.LINECount = Lines.Count;
t2.insert();
ttscommit;
// if (Lines.Count > 3784)
{
xml = xml + (XXXXX);
xml = xml + "<CCCCC>2</CCCC>";
xml = xml + "<FILEID>"+(Lines.FILEID)+"</FILEID>";
xml = xml + "<ID>"+(Lines.ID)+"</ID>";
xml = xml + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
xml = xml + "XXXXXXXXXXXXXXXXXXXXXXXX";
xml = xml + "XXXXXXXXXXXXXXXXXXXXXX";
xml = xml + "XXXXXXXXXXXXXXXXXXXXXXXX";
xml = xml + "XXXXXXXXXXXXXXXXXXXX";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + "";
xml = xml + ("</IN>");
}
}
xml = xml + "</IN></Transaction>";
}
xml = xml + "</MsgData></IMP>";
return CallDPWebservice::SendGLtoXXX(xml);
}
Above is the sample code.There are many XML fields more to fill i have just placed a sample code.
Please help in finding the solution why it is limiting the records to a specific number.
I have kept the buffer size to 64KB.
Is there any things take care.please check this and suggest me to get rid of this.
Thanks,
Phani