Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table definition for CREATE CURSOR
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01052394
Message ID:
01052409
Views:
7
what is tlAddTypes?

>>I am not saying it well. I want to add to my project a CREATE CURSOR command. The cursor I want to create is an exact match of another table that is not part of my project and not available to my application. So right now, in the project manager, I need to get the table definition of the VFP Free table and paste it as a CREATE CURSOR in my code. I do not want to hand type the CREATE CURSOR since it is a table with many fields.
>>
>>Brenda
>>
>********************************************************************
>*  Description.......: FieldsToString - creates a string with fields in a table
>*  Calling Samples...:
>*  Parameter List....: tlAddTypes, tlAddAlias
>*  Created by........: Nadya Nosonovsky 04/21/2005
>*  Modified by.......: *-- CHANGE - NN - August 10, 2005 - 15:10:45
>********************************************************************
>FUNCTION FieldsToString
>LPARAMETERS tlAddTypes, tlAddAlias
>
>LOCAL lcStr, lnI, lnFields, laFields[1], lcType
>lnFields = AFIELDS(laFields)
>lcStr = ""
>
>FOR lnI = 1 TO m.lnFields
>    lcType = laFields[m.lnI,2]
>    lcStr = m.lcStr + ", " + IIF(m.tlAddAlias,ALIAS() + ".", "") + laFields[m.lnI, 1] + ;
>    IIF(m.tlAddTypes, " " + m.lcType + ;
>    IIF(NOT INLIST(m.lcType, "D","T","I","G","M","Y"), "(" + TRANSFORM(laFields[m.lnI,3]) + ;
>    IIF(laFields[m.lnI,4] > 0, ", " + TRANSFORM(laFields[m.lnI,4]),"") + ")",""),"") 		
>NEXT
>_cliptext = SUBSTR(m.lcStr, 3)
>************************************************************************
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform