Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    5

    Unanswered: Backup-Please help been trying to work on this for weeks.

    Ok here goes. I've got a database with 3 tables; tblCustomers, tblSuppliers and tblStock. Each of these tables contain about 10-15 records. Now here's the bit i'm stuck on..

    In Delphi, i want to have 3 back buttons on a form. Button 1 for backing up customer records. Button2 for backing up supplier records, and button 3 for backing up stock records.

    So, when I click on Button1 for e.g., it will backup/copy all the customer records from tblCustomers to a .dat file or a txt file. However, i have no idea about the coding for the buttons.

    Can someone please help me this backup procedure. I've been stuck on it for weeks. Thanks in advance.

  2. #2
    Join Date
    Mar 2004
    Posts
    5
    Ok this is what i've got but it keeps saying statement expected but var found..

    procedure TfrmCustomers.BackupCustomerRecordsClick(Sender: TObject);
    begin
    var
    Source, Destination, mPath1, mPath2: string;
    begin
    Source := mPath1 + 'C:\WINDOWS\Desktop\Delphi-Project\Database\Car-Rentals';
    Destination := mPath2 + 'C:\WINDOWS\Desktop\Delphi-Project\System\Backup\Backup.dat';
    CopyFile(PChar(Source),PChar(Destination),...);
    end;

    end;

    Where car-rentals is the name of the database and backup.dat i placed in the directory stated above.

    can some1 pls help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •