Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
when i am going to upload control & upload excel files then click btnUpload use Oledb connection, when do the Open connection then this message are shown.



OS: WINDOW 10 and Window 2007
V.S 2010
Sql Server 2008R2

What I have tried:

C#
using (OleDbConnection con = new OleDbConnection(conString))
{
using (OleDbCommand cmd = new OleDbCommand())
{
cmd.Connection = con; //here msg popup shown
con.Open();
dtTabs = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
//sheetName = dt.Rows[0]["Table_Name"].ToString();
//sheetName = "Insureds$";
con.Close();
}
}
Posted
Updated 3-Nov-16 19:37pm
v2

1 solution

 
Share this answer
 
Comments
verma.vivek 4-Nov-16 2:01am    
I already read this, but didn't get exact solution. Pls suggest...
Mehdi Gholam 4-Nov-16 6:24am    
The exact solution is to install the matching office version or change your connection string to the office version you have.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900