Hi,
I am working on an ASP.NET application. From a page, I am triggering export
of a large dataset into an Excel file using OLE DB Provider and after the
export is complete the user is redirected to the excel file. Note that the
operations here are synchronous. The problem is the data exported is not
getting written out to the disk before the user is redirected. So I get an
empty excel file in IE while if I check the actual file on the disk, the
data seems to be there after a lag of a few seconds.

From the KB article, I learnt I cannot set the Max Buffer Size property in
OLE DB cannot be set in ADO.NET. How do I ensure that the data is flushed to
the disk before I redirect the user to the file?

Thanks in advance,
Pranav

Re: Problem with OLE DB Provider by Miha

Miha
Fri Feb 20 04:10:23 CST 2004

Hi Pranav,

Huh, weird.
Do you close the connection after exporting?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Pranav Nabar" <psnabar@msn.com> wrote in message
news:eTwQQQ49DHA.2532@TK2MSFTNGP09.phx.gbl...
> Hi,
> I am working on an ASP.NET application. From a page, I am triggering
export
> of a large dataset into an Excel file using OLE DB Provider and after the
> export is complete the user is redirected to the excel file. Note that the
> operations here are synchronous. The problem is the data exported is not
> getting written out to the disk before the user is redirected. So I get an
> empty excel file in IE while if I check the actual file on the disk, the
> data seems to be there after a lag of a few seconds.
>
> From the KB article, I learnt I cannot set the Max Buffer Size property in
> OLE DB cannot be set in ADO.NET. How do I ensure that the data is flushed
to
> the disk before I redirect the user to the file?
>
> Thanks in advance,
> Pranav
>



Re: Problem with OLE DB Provider by Pranav

Pranav
Fri Feb 20 06:45:54 CST 2004

Yes Miha. I close the connection immediately after exporting and before
redirecting. This does not happen on every machine. It is happening on our
production setup which is a high-end multiproc machine.

I got the feeling that the disk-write was being done asynchronously after/in
the connection close. One thing to note here is that larger the data
exported, more is the probably of finding hitting the problem (as expected).
At present we have add a Thread.sleep of 10 secs between the export and the
redirecting steps. However, with this we have merely succeeded in raising
the threshold data size for the export is successful. We would like a better
and assured solution.

Thanks,

-pranav

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:OOOb$m59DHA.3900@tk2msftngp13.phx.gbl...
> Hi Pranav,
>
> Huh, weird.
> Do you close the connection after exporting?
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & software development
> miha at rthand com
> www.rthand.com
>
> "Pranav Nabar" <psnabar@msn.com> wrote in message
> news:eTwQQQ49DHA.2532@TK2MSFTNGP09.phx.gbl...
> > Hi,
> > I am working on an ASP.NET application. From a page, I am triggering
> export
> > of a large dataset into an Excel file using OLE DB Provider and after
the
> > export is complete the user is redirected to the excel file. Note that
the
> > operations here are synchronous. The problem is the data exported is not
> > getting written out to the disk before the user is redirected. So I get
an
> > empty excel file in IE while if I check the actual file on the disk, the
> > data seems to be there after a lag of a few seconds.
> >
> > From the KB article, I learnt I cannot set the Max Buffer Size property
in
> > OLE DB cannot be set in ADO.NET. How do I ensure that the data is
flushed
> to
> > the disk before I redirect the user to the file?
> >
> > Thanks in advance,
> > Pranav
> >
>
>