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();
}

 

arrow
arrow
    文章標籤
    C#
    全站熱搜
    創作者介紹
    創作者 芭樂養樂多 的頭像
    芭樂養樂多

    隨手筆記

    芭樂養樂多 發表在 痞客邦 留言(0) 人氣()