Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create table
Message
 
À
17/09/2006 02:32:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01154451
Message ID:
01154456
Vues:
9
>hi all,
>
>is there a way to create new table after i choice fields from ather table,
>
>via my form i can drage (choice) any filed and insert it at text1 or text2 or text3... etc.
>
>i need to create table first field as (no.) the laste 2 fields as flage and n_try this 3 fields need it every time, other fileds it is be as what i drag(choice) at text1,text2....enclude the same type....etc .
>
>
>
>create table mytable(no n(3),(thisform.text1.value) same field type ,text2 type,.........etc..,flag n(2),n_try(3))
>
>
>thanks.
lcMacro = [CREATE TABLE MyTable No N(3)]
FOR lnFor = 1 TO 15 && Instead of 15 put the actual number of TextBox controls you have in form
    IF PEMSTATUS(thisform,[TextBox]+TRANSFORM(lnFor),5)
       WITH EVALUATE([thisform.TextBox]+TRANSFORM(lnFor))
            IF NOT EMPTY(.Value)
               lcMacro = lcMacro +  [,] + ALLTRIM(.Value)+[ TYPE_OF_THE_FIELD (LENGTH_OF_THE_FIELD)]
            ENDIF
       ENDWITH
    ENDIF
NEXT
lcMacro = lcMacro +  [, Flag N(2), N_Try N(3))]
&lcMacro
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform