Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Operator/operand type mismatch
Message
De
07/03/2007 09:16:33
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01201366
Message ID:
01201459
Vues:
27
hi,
thank you for reply,
Mr.Tore help me and it works
thanks.

>Don't use VFP reserved words as your variable names. Otherwise you may get into all sorts of trouble.
>
>>hi,
>>thank you very much,
>>i try it i get error message "x" is not an array
>>
>>select distinct session_nu from (thisform.text1.value) into array ASESSION
>>for x=1 to alen(aSession)
>>  cCount=aSession(x)&& "x" is not an array
>>  file_name="session_nu"+alltrim(cSession)
>>  select * from (thisform.text1.value) where session_nu=cCount into table (file_name)
>>endfor
>>
>>
>>
>>>If session_nu is character, you should be able to use val(session_nu). But it is better to compare character values directly.
>>>cSession=str(p_count,2) && if session_nu is C(2)
>>>select * from (thisform.text1.value) where session_nu=cSession into table (file_name)
>>>Also check whether session_nu is left justified or not. If the value for example is '4 ' in stead of ' 4', you must use
>>>cSession=oadr(p_count,2) && if session_nu is C(2)
>>>select * from (thisform.text1.value) where session_nu=cSession into table (file_name)
>>>
>>>To check for the different values for session_nu, you can select all the values into an array
>>>select distinct session_nu from (thisform.text1.value) into array aSession
>>>for x=1 to alen(aSession)
>>>  cCount=aSession(x)
>>>  file_name="session_nu"+alltrim(cSession)
>>>  select * from (thisform.text1.value) where session_nu=cCount into table (file_name)
>>>endfor
>>>>thank you,
>>>>Most likely session_nu is not numeric. yes ,(session_nu) charatcter type.
>>>>i try as val(session_nu)....error .
>>>>
>>>>thank you for file_name="session_nu"+transform(p_count).
>>>>
>>>>mytable have different session_nu every time,
>>>>for p_count=1 to 4,5,3 or 10...etc,
>>>>is there away to count session_nu to variable as
>>>>
>>>>for p_count=1 to m.e
>>>>thanks
>>>>
>>>>
>>>>>>hi all,
>>>>>>
>>>>>>i try via this code under i get erroe message Operator/operand type mismatch
>>>>>>
>>>>>>thisform.text1.Value=GETFILE("dbf")
>>>>>>for p_count=1 to 4
>>>>>>file_name="session_nu"+alltrim(str(p_count))
>>>>>>select * from (thisform.text1.value) where session_nu=p_count into table (file_name)&&Operator/operand type mismat
>>>>>>next
>>>>>>
>>>>>>
>>>>>>thanks
>>>>>
>>>>>Most likely session_nu is not numeric. And by the way, you can simplify the line file_name="session_nu"+alltrim(str(p_count)) to file_name="session_nu"+transform(p_count). And add a space between table and (file_name)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform