![]() Public DataTable Exceldatatable(string path) SqlBulkCopy sqlBulk = new SqlBulkCopy(connection) SqlConnection connection = new SqlConnection(con) ![]() String con = "Data Source=(localdb)\\ProjectsV13 Initial Catalog=School Integrated Security=True Connect Timeout=30 Encrypt=False TrustServerCertificate=False ApplicationIntent=ReadWrite MultiSubnetFailover=False" private void Button1_Click(object sender, EventArgs e) Here is a simple code for your reference. ![]() Based on your description, you want to solve the exception that you get when you import data into db table from excel file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |