I have a visual studio application which uses a local database with the help of service based database in VS2013. How can I import a csv file into this local database?
Asked
Active
Viewed 4,545 times
1
-
sql server.with out using sql I have to import. – beginer_programer Mar 18 '15 at 08:28
1 Answers
2
You first need to create a table in your database in which you will be importing the CSV file. After the table is created, follow the steps below. Log into your database using SQL Server Management Studio
- Right click on your database and select Tasks -> Import Data...
- Click the Next button
- For the Data Source, select Flat File Source. Then use the Browse button to select the CSV file. Spend some time configuring how you want the data to be imported before clicking on the Next button.
- For the Destination, select the correct database provider. Enter the Server name; check Use SQL Server Authentication, enter the User name, Password, and Database before clicking on the Next button.
- On the Select Source Tables and Views window, you can Edit Mappings before clicking on the Next button.
- Check Run immediately and click on the Next button.
- Click on the Finish button to run the package.

Yammi
- 61
- 2
-
okey but I am not using sql server.visual studio have its own dB(local db).then how – beginer_programer Mar 18 '15 at 08:55
-
A comment for anyone else who lands here - you can and must connect to local DB using SSMS. The "Tasks" dialog is not available in the Visual Studio SQL Server Object Explorer. – ChiefMcFrank Oct 27 '20 at 05:04