Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm reading a file whose first record is just ahead showing the date the file was created. The second record is the field list and the rest is data. My first step is to load the file to get the date from the first record and load it into a variable, which will be used to show the user how current the data is. After that, it's a normal load of the data. Here what the script does...
It works perfectly, but I'm finding it takes a long time to get the date. I'm guessing that it's reading the entire file just to find out there's only one record with RecNo()=1.
Any ideas on how I can make the load script actually stop after the first record and move on?
Thanks,
Dino
Dino,
Use this:
First 1;
LOAD
...
(I often use "first 100" for script testing to avoid long load.)
Dino,
Use this:
First 1;
LOAD
...
(I often use "first 100" for script testing to avoid long load.)
Yep, that did it...I was even able to do away with the WHERE clause.
That was way too simple - somehow, I'm thinking I should have already known how to do this. 😞
Thanks,
Dino
That's not a problem. I'm still finding, after many years using QV, things and solutions I don't know, sometimes simple... ![]()
Hi,
I would suggest you try the "first" function. simply put First 1 before Laod and it will only laod one record. I have not tested it but it's worth a try I think.
sorry guys I did not see that Michael ahd already replied to this. ![]()