Thanks for the quick reply. But not sure if I understand what you meant. Can you please elobarate or a code snippet helps..
Thank you, Dev On Wednesday, October 30, 2013 4:40:02 PM UTC-4, srussell705 wrote: > > I would attempt to change the file name as my test for write completed. > > > On Wed, Oct 30, 2013 at 3:16 PM, Learner <pra...@gmail.com > <javascript:>>wrote: > >> Hi, >> >> The dataset in my application reads an xml from the network and uses that >> as a datasource to load the data. This XML file is generated every 15 mins >> (15 mins old data to the live). Users search against this xml file and I >> want to make sure that the xml file is ready and not still being written >> the to the network folder. If it still writing then I would like to put the >> thread to sleep for couple of seconds and try reading the file again. Here >> is what I currently have and this needs modification. >> >> protected void BindData() >> >> { >> >> try >> >> { >> >> DataView dvGridData; >> >> AXGridView.PageIndexChanging += new GridViewPageEventHandler(** >> AXGridView_PageIndexChanging); >> >> AXGridView.PagerTemplate = null; >> >> DataSet dsGridData = new DataSet(); >> >> dsGridData.ReadXml(Server.**MapPath(FilePath)); //This is how I >> am reading XML file. This is where I need to test if it is written >> completely and if not need to wait for couple of seconds or until it is >> fully written. >> >> if (dsGridData.Tables.Count > 0) >> >> dvGridData = new DataView(dsGridData.Tables[0])**; >> >> else >> >> dvGridData = new DataView(); >> >> dvGridData.RowFilter = FilterExpression; >> >> AXGridView.DataSource = dvGridData; >> >> AXGridView.DataBind(); >> >> } >> >> catch >> >> { >> >> throw; >> >> } >> >> } >> >> >> Thanks for the any help or code. >> >> >> Thanks, >> >> >> Dev >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML >> Web Services,.NET Remoting" group. >> To post to this group, send email to >> dotnetde...@googlegroups.com<javascript:> >> To unsubscribe from this group, send email to >> dotnetdevelopm...@googlegroups.com <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en >> or visit the group website at http://megasolutions.net >> >> --- >> You received this message because you are subscribed to the Google Groups >> "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web >> Services,.NET Remoting" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to dotnetdevelopm...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Stephen Russell > Sr. Analyst > Ring Container Technology > Oakland TN > > 901.246-0159 cell > -- -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to dotnetdevelopment@googlegroups.com To unsubscribe from this group, send email to dotnetdevelopment+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net --- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To unsubscribe from this group and stop receiving emails from it, send an email to dotnetdevelopment+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.