string strPathDB = null;
private void button2_Click(object sender, EventArgs e)
{
if (!File.Exists(strPathDB))
{
MessageBox.Show("檔案不存在");
return;
}
string temp=DateTime.Now.Year.ToString();
temp+=DateTime.Now.Month.ToString();
temp+=DateTime.Now.Date.ToString();
temp+=DateTime.Now.Hour.ToString();
temp+=DateTime.Now.Minute.ToString();
temp+=DateTime.Now.Second.ToString();
temp=strPathDB.Substring(0,strPathDB.LastIndexOf("\\")+1)+temp;
string temp2="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+temp;
string strPathDB2="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+strPathDB;
File.Copy(temp, strPathDB, true);
File.Delete(temp);
MessageBox.Show("完成");
}
資料庫搜尋