Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Non data bearing primary keys
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00106667
Message ID:
00107620
Views:
30
>Do you have to use a UDF or could you just do somthing like:
>
>ID = 1
>begin import loop
>ID = ID + 1
>(append records)
>end import loop

Hmmmmm..... I'm not sure how I would fit this into my framework. Basically the UDF I had used in the test did the same thing you gave me above but in a SCAN-ENDSCAN loop. I guess I don't know of way to append 1 record from a multi-line text file, set ID, append next record, etc.

Here's a simplified version of how I append in my data:
*- Update Source Tables with New Data
SELECT FileListCursor
GO TOP
DO WHILE NOT EOF()  
   SCATTER FIELDS SystemCode, Ref_num MEMVAR   &&Note-FPW2.6 Current Platform
   m.Filename = m.SystemCode+"filesuffix.fla"
   && some code to verify m.filename exists and handle if missing or old
   SELECT SourceDataTable
   APPEND FROM (m.FileName)TYPE DELI
   REPLACE ALL ref_num WITH m.ref_num FOR EMPTY(ref_num)
   &&This Was where my test called UDF to generate Non-Data PKs
   SELECT FileListCursor
   SKIP
ENDDO

*- Begin Source Table Specific Data Manipulation
(ok my fingers are crossed here gang, and I'm hoping all the gurus out there don't make me start thinking about how to rewrite my whole framework after seeing this message) =D)
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform