Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug: Select - SQL
Message
From
19/02/2002 16:06:00
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00622127
Message ID:
00622181
Views:
25
Hi Simon

VFP determines the structure of the result by looking at the expressions before it starts grabbing data. So in each case, the expressions resulted in different lengths.

>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
Previous
Reply
Map
View

Click here to load this message in the networking platform