Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find field properties
Message
 
 
To
27/09/2006 10:20:00
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Miscellaneous
Thread ID:
01157475
Message ID:
01157492
Views:
17
The TYPE() function will not return exact field type for some data types, integer, for example.

>cFieldInfo = fGetFieldTypeSize("mytable","myfield")
>cFieldType = left(cFieldInfo,1)
>cFieldSize = val(substr(cFieldInfo,2,len(cFieldInfo)-1))
>
>function fGetFieldTypeSize
>lparameters cTableName, cFieldName
>
>cReturnValue = .F.
>for nFieldNo = 1 to fcount(cTableName)
>....if lower(field(nFieldNo, cTableName)) = lower(cFieldName)
>........cReturnValue = type('cFieldName') + fsize(cFieldName, cTableName)
>........exit for
>....endif
>endfor
>
>return cReturnValue
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform