Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy data from floppy to hard disk - what's wrong?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00321783
Message ID:
00321789
Views:
19
>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 && you're already positioned to the DOC record
    GATHER MEMVAR

  ENDIF && !SEEK
ENDSCAN && ALL for NewFil
HTH.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform