private DataSet GetDBData(string DBLink,string Sql,string TableName) { SqlConnection Conn = new SqlConnection(DBLink); SqlDataAdapter da = new SqlDataAdapter(Sql, Conn); DataSet ds = new DataSet(); da.Fill(ds, TableName); return ds; } private void DataControl(string DBLink,string Sql) { SqlConnection Conn = new SqlConnection(DBLink); Conn.Open(); SqlCommand command = new SqlCommand(Sql,Conn); command.ExecuteNonQuery(); Conn.Dispose(); Conn.Close(); }
文章標籤
全站熱搜
留言列表