Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IMPORT DELIMITED FILES
Message
From
26/01/2000 01:39:37
 
 
To
26/01/2000 01:25:15
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00322061
Message ID:
00322647
Views:
24
>THANK U FOR YOUR HELP.
>
>My another question is, I use following statement to append the record on temp table into my main table after doing some selection. But problem is, when I use following statement :
>
> mfile = sys(6)

If this is really what you're doing, SYS(6) returns the defaulr printer.

> CREAT TABLE &mfile ...
> .
> .
> .
> insert into maintable (a, b, c) ;
> value (mfile.a,mfile.b,mfile.c)

mfile in the value statement here is a literal. I also would not use needless macro expansion - name expansion would do just fine:

mFile = SYS(3) && a file name not an alias

CREATE TABLE (mfile) ... blah blah woof woof
USE (DBF()) ALIAS MyNewRecs
.
. blah blah woof woof
.

INSERT INTO Maintable VALUE (a, b, c)

or

INSERT INTO maintable VALUE ( MyNewRecs.a, MyNewRecs.b, MyNewRecs.c)

And I hope you aren't really naming fields 'a', 'b' 'c' because you're making the code that much harder to understand tomorrow. If the fields are the invoice number, part number and qty for example, give yourself a clue, name the fields InvNo, PartNo and Qty, so when you pick up the code it looks like:

INSERT INTO maintable VALUE( MyNewRecs.InvNo, MyNewRecs.PartNo, MyNewRecs.Qty)

Which gives you or the next guy a chance to understand what is happening...

Being cryptic to save a few keystrokes hurts you in the long run unless you're on the verge of losing use of your hands from carpal tunnel syndrome, in which case, you'll be a hopeless cripple 5 lines later in the incomplete and now uncomprehensible code.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform