* contrib/hbamf/tests/tstendin.prg
* contrib/hbblat/blatcls.prg
* contrib/hbct/tests/ctwtest.prg
* contrib/hbct/tests/token2.prg
* contrib/hbhttpd/readme.txt
* contrib/hbhttpd/widgets.prg
* contrib/hbmisc/fileread.prg
* contrib/hbmisc/hbedit.prg
* contrib/hbmysql/diff-en.txt
* contrib/hbmysql/diff-es.txt
* contrib/hbmysql/tests/dbf2mysq.prg
* contrib/hbmysql/tmysql.prg
* contrib/hbmysql/tsqlbrw.prg
* contrib/hbnetio/tests/netiot03.prg
* contrib/hbnetio/tests/netiotst.prg
* contrib/hbnf/doc/en/fttext.txt
* contrib/hbodbc/browodbc.prg
* contrib/hbodbc/tests/odbcdemo.prg
* contrib/hbodbc/todbc.prg
* contrib/hbtip/ftpcli.prg
* contrib/hbwin/tests/olesrv1.prg
* contrib/rddads/ads.ch
* contrib/rddsql/readme.txt
* contrib/sddodbc/tests/test2.prg
* contrib/xhb/dbf2txt.c
* contrib/xhb/hbcompat.ch
* contrib/xhb/hblog.prg
* contrib/xhb/html.ch
* contrib/xhb/tfile.prg
* contrib/xhb/tframe.prg
* contrib/xhb/ttable.prg
* ChangeLog
* doc/en/dbdelim.txt
* doc/en/dbsdf.txt
* doc/en/rdddb.txt
* doc/en/terminal.txt
* extras/gtwvw/tests/wvt2wvw.ch
* extras/httpsrv/cookie.prg
* extras/httpsrv/modules/tableservletdb.prg
* extras/rddado/adordd.ch
* extras/rddado/adordd.prg
* include/assert.ch
* include/hbsix.ch
* src/debug/dbgbrwsr.prg
* src/debug/dbgtinp.prg
* src/rdd/*.prg
* src/rtl/*.prg
* tests/*.prg
* tests/rddtest/rddtst.prg
* tests/usrrdd/exarr.prg
* tests/usrrdd/exfcm.prg
* utils/hbtest/hbtest.prg
* more minor
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
//NOTEST
|
|
/*
|
|
* $Id$
|
|
*/
|
|
|
|
// Test program for COPY TO SDF and APPEND FROM SDF
|
|
// Note: Only COPY TO SDF is fully implemented at this time...
|
|
/* Harbour Project source code
|
|
http://harbour-project.org/
|
|
Donated to the public domain on 2001-04-18 by David G. Holm <dholm@jsd-llc.com>
|
|
*/
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL ncount := 0
|
|
|
|
USE test NEW
|
|
// Copy all records and fields.
|
|
COPY TO test1 SDF
|
|
|
|
// Copy only address fields for records with salary over 50,000.
|
|
COPY FIELD first, last, street, city, state, zip TO test2 SDF FOR _field->salary > 50000
|
|
|
|
// Only copy record 3.
|
|
COPY RECORD 3 TO test3 SDF
|
|
|
|
// Copy records 4 through 7.
|
|
COPY NEXT 4 TO test4 SDF
|
|
|
|
// Try to copy 10 records, starting 5 records from EOF, using WHILE
|
|
GO BOTTOM
|
|
SKIP -4
|
|
COPY WHILE ncount++ < 9 TO test4a SDF
|
|
|
|
// Copy the last 10 records.
|
|
GO BOTTOM
|
|
SKIP -9
|
|
COPY REST TO test5 SDF
|
|
|
|
// Copy the last 10 records again.
|
|
GO BOTTOM
|
|
SKIP -9
|
|
COPY TO test6 SDF WHILE ! Eof()
|
|
|
|
// Copy only some of the last 10 records.
|
|
GO BOTTOM
|
|
SKIP -9
|
|
COPY REST TO test7 SDF FOR _field->married
|
|
|
|
// Try to append from a file that we know does not exist.
|
|
DELETE FILE test8.txt
|
|
APPEND FROM test8 SDF
|
|
|
|
RETURN
|