FOR WEB
using System.Collections;
ArrayList ArrSql1 = new ArrayList();
ArrSql1.Add("COMMAND");
private bool DBWriter(ArrayList SQL)
{
try
{
SqlCommand DBCommand = new SqlCommand();
SqlTransaction DBTransaction;
SqlConnection DBConnection = new SqlConnection();
DBConnection.ConnectionString = ConfigurationManager.ConnectionStrings["INFOBCKConnectionString"].ConnectionString.Trim();
DBConnection.Open();
DBCommand = DBConnection.CreateCommand();
DBTransaction = DBConnection.BeginTransaction("SQLTransaction");
DBCommand.Connection = DBConnection;
DBCommand.Transaction = DBTransaction;
try
{
for (Int32 i = 0; i < SQL.Count; i++)
{
DBCommand.CommandText = SQL[i].ToString();
DBCommand.ExecuteNonQuery();
}
DBTransaction.Commit();
return true;
}
catch (Exception ex)
{
DBTransaction.Rollback();
ex.ToString();
return false;
}
}
catch (Exception ex)
{
ex.ToString();
return false;
}
}
適用範圍:Windows
98/Me/2000
在區域網路內分享資料夾讓別人讀取,是常有的事情,設密碼就可以限制不是任何人都可以讀取你的資料。用以下的方法,可以讓人在網路芳鄰中,無法看不到你分享的資料夾喔。
STEP1:打開「檔案總管」,在要分享的文件或資料夾上按一下右鍵,從選單中點選【內容】。