Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-02-18
3
Medium Priority
?
579 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 66

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 34

Accepted Solution

by:
Big Monty earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

772 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