Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert fields
Message
De
08/09/2005 08:20:53
 
 
À
08/09/2005 08:04:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Divers
Thread ID:
01047638
Message ID:
01047655
Vues:
9
hi,
still not work,
m.char2....
i get erro message ,must be a file variable

i use SUSPEND nothing happend, i exit via skip

thanks.

>Add SUSPEND after the Scatter line, and check what value the different memvar values are. Be sure to add m. before the names, like m.char2, or you will see the value of the field with the same name in stead.
>
>>hi,
>>this is the all of code ,
>>if i put scatter memvar memo,it works but get all fields
>>
>>CLOSE all
>>activate screen
>>SET TALK OFF
>>SET ECHO off
>>GETDIR()
>>
>>thisform.text1.Value=GETFILE()
>>thisform.text2.value ="am"
>>SET DEFAULT TO e:\ut
>>LOCAL am
>>am = thisform.text2.value
>>CREATE TABLE &am(char1 C(10), char2 C(70),char3 C(10), char4 C(10),char5 C(10), char6 C(40),char7 C(10), char8 C(10),char9 c(10), char10 c(40),char11 C(10), char12 C(60),char13 C(50), char14 C(40),char15 C(10), char16 C(10),char17 C(10), char18 C(70),char19 C(10), char20 C(10),char21 C(10), char22 C(40),char23 C(10), char24 C(10),char25 C(10), char26 C(70),char27 C(10), char28 C(10) NOCPTRANS)
>>APPEND FROM (thisform.text1.value)TYPE XLS
>>
>>use am exclusive
>> index on val(char9) tag char9
>>
>>
>>select  sys(2015) as SortOrder,* from am ;
>> order by 1 descending ;
>> into cursor crsTemp nofilter
>>
>>
>>select am
>>zap
>>select crsTemp
>>
>>scan
>> if !seek(char9,'am','char9')
>>      scatter fields char2 , char4 , char7, char8, char9, char13 ,          char25, char26, char27, char28  memvar
>>   insert into am from memvar
>> endif
>>endscan
>>
>>
>>Select * from am ;
>>  where INLIST( val(char3), 100, 201, 202, 203 );
>> and ( inList( upper(allt(char25)), "ADSL 1", "B ISDN  ") or upper(left(char25,2)) = "LL" );
>>  into table am2 nofilter
>> brow
>>
>>**************************convert to excel*****************
>>CLOSE all
>>USE am2
>>*GETFILE()
>>
>>gcDelimName = ALIAS( ) + '.xls'
>>
>>gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
>>
>>IF EMPTY(gcDelimFile)  && Esc pressed
>>
>>   CANCEL
>>
>>ENDIF
>>
>>COPY TO (gcDelimFile) XLS   && Create delimited file
>>
>>DROP TABLE am
>>DROP TABLE am2
>>SET DEFAULT TO e:\ut
>>
>>
>>
>>thanks
>>>>hi,
>>>>thank you,
>>>>i try it before i get only the fields without any data.
>>>
>>>Then you did something wrong! Try again, and check that the selected record really contains any data.
>>>
>>>>
>>>>>Remove the EXCEPT keyword
>>>>>scatter fields char2 , char4 , char7, char8, char9, char13 ,     char25, char26, char27, char28  memvar
>>>>>
>>>>>>hi,
>>>>>>thank you for reply,
>>>>>>
>>>>>>i have many fields at my table i need to keep fields char2 , char4 , char7, char8, char9, char13 , char25, char26, char27, char28 only and delet others fields. any idea
>>>>>>thanks.
>>>>>>
>>>>>>>Mohammed,
>>>>>>>
>>>>>>>Try:
>>>>>>>
SCATTER MEMO MEMVAR BLANK
>>>>>>>on the line before
scatter memvar memo
>>>>>>>
>>>>>>>While you're at it, I'd also recommend reading this article:
>>>>>>>http://fox.wikis.com/wc.dll?Wiki~DataNormalization~SoftwareEng
>>>>>>>
>>>>>>>
>>>>>>>>hi all,
>>>>>>>>any idea, help,
>>>>>>>>i try via code under to insert those fields only at my table , but i see other fields but empty fields,
>>>>>>>>i don't want to get this fields at my table , just fields i choise ,
>>>>>>>>
>>>>>>>>scan
>>>>>>>> if !seek(char9,'am','char9')
>>>>>>>> * scatter memvar memo
>>>>>>>>**i try as..   scatter fields   char2 , char4 , char7, char8, char9, char13 ,     char25, char26, char27, char28  memvar &&& no data at my table
>>>>>>>>
>>>>>>>> scatter fields except  char2 , char4 , char7, char8, char9, char13 ,     char25, char26, char27, char28  memvar
>>>>>>>>   insert into am from memvar
>>>>>>>>
>>>>>>>> endif
>>>>>>>>endscan
>>>>>>>>
>>>>>>>>
>>>>>>>>thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform