>I'm trying to copy data from a floppy disk onto the hard drive. I know how to do this in DOS but am having trouble in VFP. I've attached the code. Right now it's duplicating everything on the C drive. My 3rd sele line that says sele document is where the problem is I think. How do I get VFP to know that document is the table on the floppy?
>
>TIA
>
> select 0
> use a:document
> sele doc
> set order to dnumber
> sele document
> do while not eof()
> scatter memvar memo
> select doc
> seek document.dnumber
> if not found()
> sele doc
> append blank
> gather memvar
> else
> select doc
> gather memvar
> endif
> select doc
> skip
> enddo
Hi Ellen,
Try this instead:
(assumes that the file "doc" is already open)
USE A:\Document ;
IN 0 ;
ALIAS NewFil
SELECT Doc
SET ORDER TO dnumber
SELECT NewFil
SCAN ALL
SCATTER MEMVAR MEMO
IF !SEEK( Document.dnumber, "Doc" )
INSERT INTO Doc ;
FROM MEMVAR
ELSE
GATHER MEMVAR
ENDIF
ENDSCAN
HTH.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN
If a vegetarian eats vegetables, what does a humanitarian eat?