Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating and updating backup databases
Message
From
06/01/1998 04:26:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/01/1998 15:46:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00069623
Message ID:
00069754
Views:
44
>I am looking for a way to create backup databases
>
>The backup databases are stored on a backup server.
>
>I have no field for last update date and times in the records
>The databases must be updated every 15 minutes.
>The databases a 100 MB
>
>
>Kind regard,
>
>Jan Dorresteijn

Hi Jan,
You mean online backup of databases or tables ?
For online database backup you could use this (will be also in FAQ section by tomorrow I hope) :
******
* Please note that params are without extension, no control for that
******
procedure DbBackupOnline
lparameters cDbName, cNewName
r1 = fopen(cDbName+".dbc")    && Just readonly access
r2 = fopen(cDbName+".dct")
r3 = fopen(cDbName+".dcx")
w1 = fcreate(cNewName+".dbc")
w2 = fcreate(cNewName+".dct")
w3 = fcreate(cNewName+".dcx")
=fcopy(r1,w1)
=fcopy(r2,w2)
=fcopy(r3,w3)

function fcopy
lparameters nReadHandle, nWriteHandle
do while !feof(nReadHandle)
 =fwrite(nWriteHandle,fread(nReadHandle,512))
enddo
=fclose(nReadHandle)
=fclose(nWriteHandle)


For tables you could use SQL and recreate indexes through DBC props.
Also look at "Copy to ... with production", gendbc, gendbcx by Steve Arnott (www.stevearnott.com)
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform