473,508 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert records from Excel

Hello

I'm working on code to upload an Excel file, read the spreadsheet contents
into a datagrid, then ultimately insert each row into a sql server database.

Currently I have the file upload and datagrid functionality working. I'm now
trying to determine the best way to get the data from the dataset that
populates the datagrid into sql server.

I know that there is a dts option but would like to do this without using
dts.

I'm guessing that there is a way to loop through the datagrid and build a
string for an insert statement but am wondering if it would be possible to
use the existing dataset and associated table and a second adapter to the db
to complete the upload.???

Thanks
Nov 19 '05 #1
2 1386
I think the standard way would be to use a DataSet for the datasource
and then a data adapter that has all of the insert/update/delete
methods defined for it and use the data adapter to insert new rows
added to the dataset.

Nov 19 '05 #2
I think the standard way would be to use a DataSet for the datasource
and then a data adapter that has all of the insert/update/delete
methods defined for it and use the data adapter to insert new rows
added to the dataset.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
11237
by: Hi5 | last post by:
Hi, I am new to access I usedto work in Oracle and Mysql. I am after a way that enables me to populate a database I designed in access with lots of data which can be sorted in excel sheets, ...
2
35201
by: Mansi | last post by:
I'm trying to automate excel from c#. One of the things I need to do is to copy/paste/insert rows in excel via c# code. I tried to do the following: 1) Select a row in excel (a12 to k12) 2)...
2
45849
by: mivey4 | last post by:
Okay I have 2 tables: Table A - holds a list of new hardware serial numbers and their corresponding model (no constraints or indexes) Table B - holds a distinct list of current serial numbers...
8
4594
by: hyper-sensitive | last post by:
Hi Can some body suggest me which approach I should follow to import millions of records from data base into an excel sheet? I am working with ver. 2000 of MS-Excel . The requirement is to...
4
3110
by: Bob | last post by:
Hi all, I'm trying to import data, modify the data then insert it into a new table. The code below works fine for it but it takes a really long time for 15,000 odd records. Is there a way I...
1
2958
by: imtmub | last post by:
I have wko(Workorder) table exist in my ERP. Now i have some excel sheet that contains some new workorder(more than1000 Records). Now i need to insert all the records which present in the sheet to...
0
1478
by: imtmub | last post by:
Hi All, when i am trying to insert records from excel sheet to wko table in my database. My Excel sheet contains 400 records. I am getting the error message. please check this code and advise me. ...
14
2482
by: veer | last post by:
can any one help by providing the method inserting the records in excel file because i created it all it works fine but i have no idea about how to insert new records in the existing excel file....
1
9367
by: ccckidd | last post by:
Not sure what is going on. Trying to insert records into new worksheet using ADO command object, it runs fine, creates the new sheet and header row, but no data?? I have tried a few things, can get...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7382
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5052
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1556
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.