P
Prachi
Hi,
I have C# code that uses Jet.OLEDB.4.0 to write to an excel file.
After performing inserts using an 'insert into' SQL query, I close the
connection and reopen the file using excel objects for performing some
other operations on the file.
If the data being written using oledb is large (more than 1K records),
excel throws an error 'Cannot Access File' while opening the file
using Excel objects. If the data is less around 500 records, the
exception is not thrown.
I feel the reason for exception is that before the file is released by
oledb, the excel objects try to operate on it.
How do I make sure that the oledb has finished its writing and the
file is released, so that excel does not throw exception.
Thanks & regards,
Prachi
I have C# code that uses Jet.OLEDB.4.0 to write to an excel file.
After performing inserts using an 'insert into' SQL query, I close the
connection and reopen the file using excel objects for performing some
other operations on the file.
If the data being written using oledb is large (more than 1K records),
excel throws an error 'Cannot Access File' while opening the file
using Excel objects. If the data is less around 500 records, the
exception is not thrown.
I feel the reason for exception is that before the file is released by
oledb, the excel objects try to operate on it.
How do I make sure that the oledb has finished its writing and the
file is released, so that excel does not throw exception.
Thanks & regards,
Prachi