Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scatter Gather problem - re-explained!!!
Message
De
07/09/2000 11:35:44
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/09/2000 09:38:25
Jolene Dicks
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00413434
Message ID:
00413564
Vues:
17
>Hi,
>
>I posted a message regarding this problem several weeks ago. I am having another look at the problem again now, and still now success.
>
>Here again is my problem:
>
>
>I have a program that merges data from various external sources. I am experiencing this problem with just one section of the program.
>
>Here is my code:
>
>***************************************************************
>select process
>Wait Window "EI - Merging EI Data with Central CATS..." NoWait
>Scan
> scatter to Aarr_pro memvar
> sin_m = sin
> bpc_m = bpc
> select loclaim
> seek(sin_m+bpc_m)
> If found()
> scatter to Aarr_master memvar
> If ThisFormSet.Changes(@Aarr_pro, @Aarr_master, 49)
> Gather from Aarr_pro memvar
> Replace Dnld_Stat with 1, Dnld_Date with Date(), Lc_Action with ",;
> Lc_Time with TIME(), Lc_Date with DATE(), Lc_User with "INE"
> LoUpRecs=LoUpRecs+1
> Endif
> Else
> Append blank
> Gather from Aarr_pro memvar
> Replace Dnld_Stat with 1, Dnld_Date with Date(), Lc_Action with A",;
> Lc_Time with TIME(), Lc_Date with DATE(), Lc_User with "INE",;
> Add_Date with DATE(), Add_Time with TIME(), Add_User with "INE"
> LoAddRecs=LoAddRecs+1
> Endif
>Endscan
>
>If the record is found, it gathers from the array (which contains the contents of the process record). Three fields that exist in the loclaim table are Add_Date, Add_time and Add_user. These fields have a value inserted when they are added to the table (as you can see from the above code). They don't exist in the process table. When the gather from Aarr_pro takes place, it replaces the Add_Date, Add_time and Add_user fields with blank.
>
>There are other sections of my program that follow the same type of process when updating our central database and pretty much perform the same type of action and those add_* fields don't get modified on the gather. Any idea on why this is happening? Any suggestions on how to fix it?
>
>Thanks alot.
>
>Jolene Dicks


Jolene,
(Note :
scatter to Aarr_pro memvar
is identical to
scatter to Aarr_pro
You beat memvar purpose including 'to ArrayName')

Array based scatter-gather depends on fields order and not safe IMHO if the structures are different. If gathered fields datatype are different then might yield an empty value (ie: scatter fields first_name and gather fields mydate). Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform