DataTable into a new SQL table

G

Guest

The requirement is to transfer data from Excel to SQL tables using ASP.Net for user interface. I have populated the excel data into a dataTable of a DataSet using ADO.Net. Now, I would like to know a better way to insert this data into a new SQL table. Since the Excel has more than 30,000 rows with 20 columns , performance is also an issue here. Please help me through your ideas at the earliest.
 
O

onedaywhen

Here's one approach: connect to the Excel data source using Jet OLEDB
and execute a SELECT..INTO query using the IN keyword to specify the
SQL Server target e.g.

SELECT *
INTO [odbc;Driver={SQL
Server};Server=MyServer;Database=MyDatabase;User
ID=sa].[NewTempTable]
FROM [Sheet1$]
 
G

Guest

hi,
thanks . but when i tried the same in my app, it shows an error for ISAM not available...
can u give some solutions for this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top