Hi Cetin
>Terry,
>Examples I refer was in this thread (it has to do with SET EXACT, use == etc). To summarize:
>
>With set exact off:
>"137" = "1"
>"137" = "13"
>"137" = "137"
>all return .T. Swpapping the operands might be another solution (not recommended way as it's hiding what's intended and closely dependant to specific code):
>
>"1" = "137"
>"13" = "137"
>would be false and "137" = "137" would be true only.
AGREED
Thanks for the sample code. I have copied all your stuff from the message and will be perusing it at leisure when I have the time. At present the whole import form has been finished a long time. I'm just updating it to reflect a major upheaval in the database design. I'm not sure it'll be all that easy to slot your idea in but I'll see.
>Now more important problem is import, right:)
>I still think intermediate cursor would make your life easier. If all files have short lines as in samples it'd mean much more (less than 254*2 bytes per line). ie: You could create an intermediate cursor like:
>
>create cursor temp (f1 c(254), f2 c(254))
>append from myBus.txt type SDF
>
>It correspond to a series of fgets(), insert but is much faster than that. Manipulating a cursor is easier than manipulating a forward only fgets() implementation I think (assuming you wouldn't want to use fseek() often).
>
>For example your second sample looks a nice candidate for this idea.
>
>>QLN390030980 Ipswich: Sandyhill Lane, Roebeck Road E0057632
>>QBN390030980 617249 242417 Ipswich
>>QLN390030981 Ipswich: Sandyhill Lane, opp Roebeck Road E0057632
>>QBN390030981 617238 242410 Ipswich
>
>Data sounds to be in pair of lines. I might think of it as:
>
>BusID Description SomeCode
>------------ ------------------------------------------------ --------
>QLN390030980 Ipswich: Sandyhill Lane, Roebeck Road E0057632
>
>BusID FieldX FieldY Route
>------------ ------ ------ --------
>QBN390030980 617249 242417 Ipswich
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
- 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.