This is a discussion on how to update dataset to sql server? within the ASP and ASP.NET Programming forums, part of the Web Development category; how to update dataset to sql server? string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\export....
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| how to update dataset to sql server? string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\export.xls;Extended Properties=""Excel 8.0;HDR=YES;"""; DataSet ds = new DataSet(); OleDbDataAdapter mydata = new OleDbDataAdapter("Select * FROM [exportZAAH$]", excelConnectionString); mydata.Fill(ds); i am having my excelsheet datas in my dataset(ds) how to update this dataset to my sql server table? Thanks in advance Manivannan.s |
| Sponsored Links |
| |||
| Hi Mani, Create a select command against your table, and then use a DataAdapter with a CommandBuilder to automatically flush your DataTable. EG. SqlCommand cmd = new SqlCommand("select * from myTable",con); SqlDataAdapter da = new SqlDataAdapter(cmd); SqlCommandBuilder cb = new SqlCommandBuilder(da); DataTable dt = . . . ; da.Update(dt); Use this... ![]()
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can we sort the values in dataset? | mobilegeek | C# Programming | 4 | 04-18-2008 04:39 AM |
| Removing duplicate rows in a DataSet | shaalini | ASP and ASP.NET Programming | 2 | 02-13-2008 09:33 PM |
| Read XML by Dataset | gp_logesh | ASP and ASP.NET Programming | 0 | 10-31-2007 03:13 AM |
| Can anybody explain about the differences between dataset.clone and dataset.copy? | kingmaker | C# Programming | 2 | 08-28-2007 12:22 AM |
| Difference between ADO.NET dataset and ADO Record set? | prasath | ASP and ASP.NET Programming | 1 | 07-18-2007 08:06 AM |