Click here to Skip to main content
16,019,562 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here is code of transferring excel data about(600000) to sql


C#
chkProc = 0;
OleDbConnection oconn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath("" + pathss + "") + ";Extended Properties=Excel 12.0;Persist Security Info=False");
OleDbCommand ocmd = new OleDbCommand("select * from [" + sheetss + "$]", oconn);
oconn.Open();
OleDbDataReader odr = ocmd.ExecuteReader();


Please help me to solve it or tell me how to export huge excel data (upto 1000000) to sql ...
Posted
Updated 23-Oct-13 23:36pm
v2
Comments
Richard MacCutchan 24-Oct-13 5:37am    
Post the exact error message you receive, and indicate where it occurs.
krrazyumesh 26-Oct-13 13:13pm    
Unexpected error from external database driver(here is some symbol)

this error occurs when transferring huge data from excel to sql server 2005
it occurs at the time of oconn open(); above code.

so please help me to solve it....
krrazyumesh 14-Nov-13 1:47am    
Unexpected error from external database driver (髰粑￿￿髫粑鮠粑).

this error occurs when transferring huge data from excel to sql server 2005 it occurs at the time of oconn open();
so please help me to solve it....

1 solution

No error message says 'here is some symbol'. Post the exact error. You could also try paging your request, and handling XX records at a time. Does the driver for Excel support TOP and order by ?
 
Share this answer
 
Comments
krrazyumesh 14-Nov-13 1:47am    
Unexpected error from external database driver (髰粑￿￿髫粑鮠粑).

this error occurs when transferring huge data from excel to sql server 2005 it occurs at the time of oconn open();
so please help me to solve it....

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