Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug: Select - SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00622127
Message ID:
00622516
Vues:
24
Hi Sergey

Thanks I learned something new.

Simon

>It's correct. Every time you apply any string function or operations to the memo field in the query the result is a character field.
>
>
>>Hi Sergey
>>
>>What you are telling me is that the addition of the Upper() function changes the type from Memo to Character. If that is what supposed to happen then I am wrong about this being a bug.
>>
>>I would have thought it would still have been a Memo field with the contents in upper/lower case.
>>
>>Thanks
>>Simon
>>
>>>Because the first one creates ClassName field of type memo in the result and the second and third - character. Try to select into cursor instead of array and you'll see difference.
>>>
>>>>Hi Sergey
>>>>
>>>>I understand what you are saying but why do the two commands produce different results on the same class library. It seems to me that both should have a field length of 1 but one returns the full object name and the other does not.
>>>>
>>>>Thanks
>>>>Simon
>>>>
>>>>
>>>>>It's not a bug. Foxpro determines the size of the fields in the query result using the first record in the table. In this case it's form's record wich doesn't have anything in objname field. However field lenght cannot be 0 that why it's substituted with len 1. You can use PADR() function to specify the size of the field in the result.
Select PADR(Upper(ObjName),32) As ClassName From dcBase ;
>>>>>Where PlatForm='COMMENT'.And.UniqueID='RESERVED' into array laclass
>>>>>
>>>>>>Hi
>>>>>>
>>>>>>I was using the following command to extract information from a class library:
>>>>>>
>>>>>>Select ObjName As ClassName From dcBase Where PlatForm='COMMENT'.And.UniqueID='RESERVED' into array laclass
>>>>>>
>>>>>>However, the following only puts the first letter of each objname into the array:
>>>>>>
>>>>>>Select Upper(ObjName) As ClassName From dcBase Where PlatForm='COMMENT'.And.UniqueID='RESERVED' into array laclass
>>>>>>
>>>>>>Select Lower(ObjName) As ClassName From dcBase Where PlatForm='COMMENT'.And.UniqueID='RESERVED' into array laclass
>>>>>>
>>>>>>
>>>>>>
>>>>>>Simon White
Simon White
dCipher Computing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform