Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who's right - me or VFP?
Message
De
02/03/2005 11:08:22
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/03/2005 10:55:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00991597
Message ID:
00992016
Vues:
19
>I don't want to get into a Mohammed-like thread but, FYI, take the following line:
>
>QLN390030980 Ipswich: Sandyhill Lane, Roebeck Road E0057632
>
>"QL" introduces a bus stop rec., "N" means "new", 3900 is the county, 30980 is the stop #, the rest is the stop description
>
>QBN390030980 617249 242417 Ipswich
>
>"QB" is a continuation of a stop rec., the nos 617249 and 242417 are its lat/long, and Ipswich is the town
>
>>
>>QLN390030981 Ipswich: Sandyhill Lane, opp Roebeck Road E0057632
>>QBN390030981 617238 242410 Ipswich
>>Assuming lenghts are 20, 50, etc and all first lines of pair have ':' in it:
>
>Sore point! All the stop desc's USED to have this format, and the prog was so designed. Since this import file now has stops from other counties, one can't guarantee they have ":" in it. (some just have commas, others just one comma - can't guarantee what even more counties' data would be like).
>
>
>Jolly good idea all the same and I may just have a go at it.
>
>Thanks again and I appreicate the time and effort you've put into this.
>
>Terry

LOL M-like. No problem. I missed they were QL and QB but knowing them now my tendency for intermediate cursors is stronger. Instead of : QL and QB could be used as filters than (or Lat/lon fields containing alpha check). When you have time try once. It's really faster.
In my importer class I have no idea of what import file might look like. So first an Analyzer checks first 10 or so lines (getting into a cursor or fgets). It checks things like line lengths, tab, comma, quotes frequencies to decide on file type. Then presents the user all data in an intermediate cursor, file type 'sensed' and lets user to change type, mapping of fields etc. My initial version was using fgets and it needed a progress bar when dealing with over 20K records. Now current version still has the progress bar but unlike former all you might see is generally a flashing progress.
PS: You can check old version downloading FoxyClasses samples.
Cetin

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform