Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What could cause error on this line
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01526039
Message ID:
01526066
Vues:
49
>I agree with everything you are saying. And just for the heck of it (even though VFP does not recommend) I will try to use TEXTMERGE within TEXTMERGE just to see what comes out. Stay tuned.

It is actually quite simple after I thought about it.

To generate Insert command:
 lcTable = DataDict.TableName

select DataDict 

   scan while  TableName = m.lcTable
    lcFields = lcFields + IIF(empty(m.lcFields,'') + ', ' + CRLF + alltrim(FieldName)
    lcValues = lcValues + IIF(empty(m.lcValues,'') + ', ' + CRLF + '?' + m.lcTable + '. ' + alltrim(FieldName)
   endscan
   text to lcPRG additive textmerge noshow
           text to lcInsert noshow
          INSERT INTO <<m.lcTable>> (
                    <<m.lcFields>>
                   )
             VALUES (
                 <<m.lcValues>>
            )
        endtext
       SCAN <<m.lcTable>>

           sqlexec(hCon, m.lcInser)
      ENDSCAN
     endtext
   lcTable = DataDict.tableName
endscan

The above is the idea from the top of my head, you may need just some slight changes.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform