Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Operator/operand type mismatch
Message
De
07/03/2007 07:52:13
 
 
À
07/03/2007 07:36:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01201366
Message ID:
01201418
Vues:
38
hi,
thank you it works,

>aSew alone will always refer to the first element, meaning aSew(1)
>
>select distinct session_nu from (thisform.text1.value) into array aSew
>for x=1 to alen(aSew)
>  cCount=aSew(x)
> ? cCount&&7 sessions
>  file_name="session_nu"+alltrim(aSew(x))
>  select * from (thisform.text1.value) where session_nu=cCount into table (file_name)
>
>endfor
>>
>
>>hi,
>>i try as under, it works but duplicte the table name as sission_nu1 for every session,
>>i have only the last session, is 7 ,
>>mean one table as session-nu1 have data of (session-nu7).
>>
>>select distinct session_nu from (thisform.text1.value) into array aSew
>>for x=1 to alen(aSew)
>>  cCount=aSew(x)
>> ? cCount&&7 sessions
>>  file_name="session_nu"+alltrim(aSew)
>>  select * from (thisform.text1.value) where session_nu=cCount into table (file_name)
>>
>>endfor
>>
>>
>>
>>>Then I don't know what causes this error. Anyway, I hope I have given you some hints so that you will solve your problem.
>>>
>>>>hi ,
>>>>thank you ,
>>>>only one field have the same name as sission_nu, also same error.
>>>>
>>>>anyway thanks again.
>>>>
>>>>
>>>>>Try to replace some of the variable names, maybe they collide with your field names.
>>>>>
>>>>>>hi,
>>>>>>sorry to bother you,
>>>>>>but i try as under same error,
>>>>>>
>>>>>>select distinct session_nu from (thisform.text1.value) into array aSession
>>>>>>for x=1 to alen(aSession)
>>>>>> * cCount=aSession(x)
>>>>>>  p_count=aSession(x)
>>>>>>  file_name="session_nu"+alltrim(cSession)&&& itry it as aSession
>>>>>>  select * from (thisform.text1.value) where VAL(session_nu)=p_count into table(file_name)
>>>>>>
>>>>>>endfor
>>>>>>
>>>>>>
>>>>>>>Check for typos. And check that the first select really finds any records.
>>>>>>>
>>>>>>>>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