Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert into cursor problems
Message
From
19/03/2004 10:11:58
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00887815
Message ID:
00887901
Views:
12
Wayne - no relations set - I select at end of each scan - holdover for do while days.

Tracked it down to where I know it is creating the insert and the SDF file. Appending it to the Policy.txt table is the problem. Ususally occurs when the file is quite large -over 20,000 entries.

I ran it with all the files on my desktop and it ran fine. I am concluding it is a problem with the speed of the network and the size of the file.

Thank for your response Wayne.
Any other suggestion are more than welcome.

Gaylen


>Do you have any RELATION's? I would SELECT the SCANned table at the end of the routine just in case.
>
>Is there possibly a problem occuring on the insert? Maybe a field that is not the correct type? Or one that is null? Do you have error trapping suppressed?
>
>BTW, I had to do this about 2 years ago for a client - not fun!
>
>-w-
>
>>I have a routine where I create a cursor, populate variable and then create an ascii file using that data as follows:
>>
>>
>>select controlling table
>>scan
>>
>>*** adding header record
>>create cursor ncci_header (carrier_cd c(5)......)
>>*** get values to populate the ncci_header record		
>>Insert Into ncci_header (carrier_cd,......  )	 ;
>>			values(lccarrier_cd, ..........)
>>
>> ** add the header record
>>Select  ncci_header
>>Copy To ncci_header.txt Type Sdf
>>lc_header = Filetostr('ncci_header.txt')
>>lnbytes = Strtofile(lc_header,'policy.txt',1)
>>
>>*** adding location records or name records
>>    create cursor location
>>    get values to populate for location for controlling record
>>    insert into location
>>    add location to policy.txt using same routine as above
>>endscan
>>
>>There are about 7-8 more records types that in the routine that need to be added to the txt file for that one controlling record.
>>
>>My problem is that either the insert is not firing every time or the routine to add to the policy.txt file is not working always.
>>
>>Out of 3400 record in the controlling table - anywhere from 4-6 header records are not added. If I run it a second time it is never the same header records that are missing even though the data has not changed. Even though the header record is missing the rest of the records such as location are added correctly.
>>
>>Anyone know of any problems with insert or the use of strtofile which might explain this?
>>
>>
>>Thanks
>>Gaylen
Previous
Reply
Map
View

Click here to load this message in the networking platform