I recommend you to check this tutorials which let you know the overall process of how to import csv data to sql server in
Here, we can select the Empty Application and afterwards, you can click OK button Step 2 Now, open the project and afterwards, you can go to project. Choose the New item or those which follow the shortcut keys Ctrl Shift A. Now, you can change table name and afterwards, you can click Update button. Now, go to Server Explorer and click the table (databaseone). Here, open the database table and we need something where you can create your database oriented data, which should be like Name, Age and so on. Here, you can get the access to the Enabling page and Enable sort. For detailed information about using IPSec, see: SSL uses cryptographic functions to provide an encrypted channel between client and server applications, and can be used to secure data transmission between a SQL Server and an ASP. With SSL, each application can choose whether or not to create an encrypted communications channel; therefore, it offers more granularity than IPSec.To configure SQL Server to use SSL, you must install a server certificate on the server, and the clients must have a root certificate authority that matches the server certificate.For example, you can help secure a database server by establishing a policy that permits requests only from a trusted client computer, such as an application or Web server.
You can also restrict communication to specific IP protocols and TCP/UDP ports.This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. NET application securely to Microsoft® SQL Server™ when database access authentication uses native SQL authentication. Secure the Communications Channel to the Database Additional Resources You might not be able to use Windows authentication if a firewall between your application server and database server prevents Windows authentication or if your application server and database server are in separate domains without trust.Windows authentication is the recommended way to connect to SQL Server because you avoid storing credentials in connection strings and you avoid passing passwords over the network to your database server. In some of these situations, you might be able to use mirrored local accounts, where you connect using local accounts with the same user name and password on both computers. NET application using secured SQL Server access, encrypted connection information, and secure communications: To help make sure that the SQL account credentials remain confidential, you should encrypt the connection string in the Web.config file. Subsequently, choose the Web and afterwards, you can select the Style Sheet and click the "Add" button. Subsequently, click the right click and add a new table. Step 6 Now, you can click the Grid view and choose the data source (your data source name). Step 7 Now, we can choose the Run option, which should be like Google Chrome, Microsoft Edge and so on. Here, go to your project, click the right click and choose the add. Now, select the Visual C# and select SQL Server database and write the Server name. Here, double click the database, open the table and so on. Here, we can click the Test Query and click the Finish button.Ole Db Connection oconn = null; string File Path = "C:\dotnetmentors\Products.xlsx"; oconn = new Ole Db Connection(@"Provider=Microsoft. OLEDB.12.0; Data Source=" File Path "; Extended Properties=Excel 8.0"); Data Table dt Categories = new Data Table(); oconn. Hope this helps, With Regards, Krunal Parekh There are many ways to achieve this but one of my favorite is to first map the excel sheet headers with database table columns and insert using Bulk Copy function to write all data at once.