If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Backup-Please help been trying to work on this for weeks.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-30-04, 03:55
Pyscho Pyscho is offline
Registered User
 
Join Date: Mar 2004
Posts: 5
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.
Reply With Quote
  #2 (permalink)  
Old 03-30-04, 05:18
Pyscho Pyscho is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On