! CODEBANK 2012 !
İNDİRMEK&DETAYLI BİLGİ ALMAK İÇİN BURAYI TIKLAYINIZ.
ÖNEMLİ AÇIKLAMA: MUTLAKA OKUYUNUZ!
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
procedure TfrmYedekle.FormShow(Sender: TObject);begin IniDosya := TIniFile.Create(ExtractFilePath(Application.ExeName)+'Settings.ini'); try server:=IniDosya.ReadString('Database','Server',''); sapassword:=IniDosya.ReadString('Database','SaPassword',''); finally IniDosya.Free; end; PageControl1.ActivePage:=TabSheet1; dateseparator:=' '; shortdateformat:='ddmmyyyy'; Edit1.Text:=DateToStr(Date);end;
procedure TfrmYedekle.ShellTreeView1Change(Sender: TObject; Node: TTreeNode);begin Edit3.Text:=ShellTreeView1.Path;end;
procedure TfrmYedekle.Button1Click(Sender: TObject);var yol:string; hata:boolean; dosya_adi:string;begin if trim(Edit1.Text)='' then Edit1.Text:=DateToStr(Date); dosya_Adi:=Edit1.Text+Label6.Caption; try ADOConnection1.Connected :=false; ADOConnection1.ConnectionString := 'Provider=SQLOLEDB.1;Persist Security Info=false;User ID=sa;Initial Catalog=master;Password ='+sapassword+';Data Source=' +server; ADOConnection1.Connected := true; except Application.MessageBox('Veritabanı Bağlantı Hatası...','Veritabanı Bağlantı',0+64); end; if (Application.MessageBox('Yedekleme işlemi için "Tamam" butonuna basınız...', 'YEDEKLEME',mb_okcancel+mb_iconstop)=idok) then begin Button1.Enabled:=false; yol:=Edit3.Text; if length(yol)>3 then yol:=yol+'\'+dosya_adi else yol:=yol+dosya_adi; try ADOQuery1.Close; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('use master BACKUP DATABASE STOKDB TO DISK = '''+yol+''''); ADOQuery1.ExecSQL; Application.MessageBox('Yedekleme İşlemi Başarı İle Tamamlanmıştır...', 'MESAJ',Mb_ok+mb_iconinformation) except Application.MessageBox('Yedekleme İşlemi Başarısızlıkla Sonuçlandı...', 'MESAJ',Mb_ok+MB_ICONSTOP); end; Button1.Enabled:=true; end;end;
procedure TfrmYedekle.SpeedButton1Click(Sender: TObject);begin if OpenDialog1.Execute then Edit2.Text:=OpenDialog1.FileName;end;
procedure TfrmYedekle.Button2Click(Sender: TObject);var yol:string; hata:boolean; dosya_adi:string;begin if Trim(Edit2.Text)='' then begin ShowMessage('Dosya Adını Giriniz....'); exit; end; dosya_Adi:=Edit2.Text; try ADOConnection1.Connected :=false; ADOConnection1.ConnectionString := 'Provider=SQLOLEDB.1;Persist Security Info=false;User ID=sa;Initial Catalog=master;Password ='+sapassword+';Data Source=' +server; ADOConnection1.Connected := true; except Application.MessageBox('Veritabanı Bağlantı Hatası...','Veritabanı Bağlantı',0+64); end; if (Application.MessageBox('Yedekten Geri Yükleme için "Tamam" butonuna basınız...', 'YEDEKTEN GERİ ALMA',mb_okcancel+mb_iconstop)=idok) then begin Button1.Enabled:=false; yol:=Edit2.Text; try ADOQuery1.Close; ADOQuery1.SQL.Clear; ADOQuery1.SQL.Add('use master RESTORE DATABASE STOKDB FROM DISK = '''+yol+''''); ADOQuery1.ExecSQL; Application.MessageBox('Yedekten Geri Alma İşlemi Başarı İle Tamamlanmıştır...', 'MESAJ',Mb_ok+mb_iconinformation) except Application.MessageBox('Yedekten Geri Alma Başarısızlıkla Sonuçlandı...', 'MESAJ',Mb_ok+MB_ICONSTOP); end; Button1.Enabled:=true; end;end;
bu işlem firebird de nasıl yapılır...?