T
tshad
If I have a connection:
OleDbConnection xlsConnection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
AppSettings.InputFilePath + ";Extended Properties=\"Excel
8.0;HDR=Yes;IMEX=1\"");
And I open many files in a loop:
foreach (string strFile in strFiles)
{
da = new OleDbDataAdapter("SELECT * FROM Query1",
xlsConnection);
da.Fill(ds);
.... Some code
}
Do I need to close my connect for each file or does the Adapter do it at the
da.Fill?
Thanks,
Tom
OleDbConnection xlsConnection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
AppSettings.InputFilePath + ";Extended Properties=\"Excel
8.0;HDR=Yes;IMEX=1\"");
And I open many files in a loop:
foreach (string strFile in strFiles)
{
da = new OleDbDataAdapter("SELECT * FROM Query1",
xlsConnection);
da.Fill(ds);
.... Some code
}
Do I need to close my connect for each file or does the Adapter do it at the
da.Fill?
Thanks,
Tom