Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protecting Tables against power fail - FLUSH doesnt work
Message
From
20/11/2001 10:48:12
 
 
To
15/11/2001 22:11:25
Malcolm Sheldon
Benchmark Consultants
Australia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00582519
Message ID:
00583949
Views:
34
Hi Malcolm

I think it may be to many flushing in your program...try remove the flush after te tableupdate(.F.,.T.)


HTH

Patrick

> FOR i = 1 To 1200 &&add records into the table
> BEGIN TRANSACTION
> SELECT transfers &© records from szdtfrhd
> SCATTER MEMVAR MEMO
>SKIP
>INSERT INTO szdtfrhd FROM MEMVAR
>INSERT INTO szdtfrh1 FROM MEMVAR
>INSERT INTO szdtfrh2 FROM MEMVAR
>INSERT INTO szdtfrh3 FROM MEMVAR
>INSERT INTO szdtfrh4 FROM MEMVAR
>INSERT INTO szdtfrh5 FROM MEMVAR
>INSERT INTO szdtfrh6 FROM MEMVAR
>DO Flush_Buffers WITH 'szdtfrhd'
>DO Flush_Buffers WITH 'szdtfrh1'
>DO Flush_Buffers WITH 'szdtfrh2'
>DO Flush_Buffers WITH 'szdtfrh3'
>DO Flush_Buffers WITH 'szdtfrh4'
>DO Flush_Buffers WITH 'szdtfrh5'
>DO Flush_Buffers WITH 'szdtfrh6'
>@1,10 SAY "Added Record " + STR(i, 4, 0)
>END TRANSACTION &&Now commit everything to the database
>FLUSH
>NEXT i

>***********************
>PROCEDURE Flush_Buffers
>***********************
>PARAMETERS cAlias
>*
>*Commits the buffered table supplied and closes it
>*
>IF USED(cAlias)
>SELECT (cAlias)
>IF CURSORGETPROP('Buffering') = 5 &&Must be optimistic table buffering
>=TABLEUPDATE(1, .T.)
>ENDIF
>FLUSH <=== Remove this
>ENDIF
>RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform