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

 

創作者介紹
創作者 隨手筆記 的頭像
芭樂養樂多

隨手筆記

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