Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek Failing
Message
 
To
16/03/2000 07:43:04
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00346128
Message ID:
00348989
Views:
22
ALLTRIM in your SEEK call may require that EXACT be set OFF.

>Mike (and others),
>
>Sorry about being so vague in my question. I was in a rush...and anyway...sob story..... :-)
>
>My users are importing text files into a database. All the text files are stored under the same directory (Imports). My program goes ahead and gathers all those files and appends them into a database for each file that's out there and it's named appropriately. For example if the text file name is 022200mf.mfr then the table name is 022200mf.dbf. Once that process is complete, the user is prompted with a grid that lists all the files that are available for importing.
>
>Here's where the problem comes in, they can select one file to import or they can select all of them to import. They need that option. Once they select a file or many files, the program tells me how many records are there initially and after run my pre-processing routine, it's supposed to tell me how many pass the pre-processing routine before importing. The problem is that when I select only 1 file to import, the figures come up correctly. When I select more than one, the numbers are either off or it returns the same number that was initially counted.
>
>The records being imported are being bounced against records already in a main database of all imports that have been performed.
>
>Here's the code that handles that portion of the pre-processing:
>
>SELECT TEMPALIAS
>GO TOP
>SCAN
>SCATTER FIELD UNIQKEYSAS MEMVAR
>SELECT MF_158
>GO TOP
>IF SEEK(ALLT(M.UNIQKEYSAS))
> SELECT PROB_158
> GO TOP
> IF SEEK(ALLT(M.UNIQKEYSAS))
> SCAN WHILE ALLT(UNIQKEYSAS) = ALLT(M.UNIQKEYSAS)
> REPLACE DEL_DTime WITH MF_158.DATE_IN
> ENDSCAN
> ENDIF
> SELECT TEMPALIAS
> DELETE
>ENDIF
>SELE TEMPALIAS
>ENDSCAN
>
>RELEASE M.UNIQKEYSAS &&Make sure the MEMVAR is not retainining any erroneous data
>
>SELECT MF_158
>SET ORDER TO CDC_ID
>
>SELECT TEMPALIAS
>PACK
>
>If I place a Locate for allt(uniqkeysas) = allt(m.uniqkeysas), and a If found() instead of using a SEEK, then the numbers come out correct but it just takes entirely TOO long as you can imagine. Even a 500 records to import, it's taking 3 minutes or so.
>
>Any suggestions?
>
>TIA
>
>Jeff T.
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform