Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Who's right - me or VFP?
Message
From
03/03/2005 10:59:38
 
 
To
02/03/2005 11:08:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00991597
Message ID:
00992419
Views:
30
Hi Cetin, you Turkish delight :-)

Your suggestion to append from ... SDF, instead of repeated LL file handling calls made me think. In the past I've only ever used Append From with structured delimited files, where there's a correlation with my table structure. This case, as you know, was different. I'd never really looked at the SDF clause, finding one to suit from the others. SO I wasn't really aware that you could get the whole line of a source file at once. So I thought, this is equivalent to just having a copy of the source file, but as a table.

After reading (FGET) each line of source it's all just been string manip. to get all the various fields. So, at least for now, I've just converted my sources to tables of 79 char string fields. Then I just scan through the tables, in the same way in which I was chugging through the source, and treat each rec in the same way I was with the FGET string. This is a compromise, rather than implementing full source data conversion to tables, but is the least disruptive to the structure and flow of my existing code and slots in nicely, practically replacing LL command for HL command.

Of course, it's now faster (I wouldn't say dramatically so though), but there's another advantage: before I was FGETting my way through the text file to count how many of different type records (QL, QB, QQ, QR etc.) to get values for my progress thermometer, prior to importing the data. This was quite time consuming in itself. Now I can just use COUNT for lcRecID = "QL", or use INLIST(), etc. (as you said, "QL and QB could be used as filters to get these counts") so, as you can imagine, considerably faster here.

Yeah, so thanks a lot for the tip and stuff. This has been a good improvement. Also makes it less slow when in debug.

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform