首先创建一个数据库连接类:SQLHelper using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SqlClient; using System.Data; namespace insetData { public class SQLHelper { public static readonly string Strconn = "Data…