Err with OLE Db Connection
I have a code provided below it runs on some machine and dosen't on some ..Means some time it dose not open connection and some time gives error on GetOleDbSchemaTable ..
Can any one help..
String sConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Data.xls;Extended Properties=""Excel 8.0;HDR=Yes""";
OleDbConnection objConn = new OleDbConnection(sConnectionString);
objConn.Open();
// Get the data table containing the schema
DataTable dt = objConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables , null);
|