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();
}
請先 登入 以發表留言。