Solved

how to insert records from datatable to sql database using visual studio 2012

Posted on 2014-02-18
3
559 Views
Last Modified: 2014-02-18
how to insert records from datatable to sql database using visual studio 2012?
0
Comment
Question by:Meinhoonaa
3 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 39867950
>insert records from datatable to sql database
Q1:  Why does this have to be done with Visual Studio, and which application in Visual Studio are we talking?
Q2:  Are these databases on the same server?
  If yes, You can create a Stored Procedure that does this, referencing both databases, and execute it.  Then the SP can be called from wherever.
  If no, then you'll need an ETL tool such as SSIS, which is part of the Visual Studio suite, to move the data.
0
 

Author Comment

by:Meinhoonaa
ID: 39867967
I am using sql data client
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39868108
here's a good tutorial that'll walk you through the steps on doing this:

http://www.codeproject.com/Articles/30722/How-to-save-data-from-a-DataSet-into-a-T-SQL-table
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now