Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Table Confusion?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00456897
Message ID:
00456904
Vues:
30
Steve,

I've just made this simple test:
lcTableName="ndmsdhwekdhwkdjkwjdwk"
create table (lcTableName) free (cFld C(25))
Be sure, your lcTableName doesn't start from digit and doesn't contain "prohibit" characters, like ., for example, or ?!-+.

IOW, just put your variable in () and you would be fine.

>Weird, this works.
>
>
>cResult='astringwith45chars'
>
>cTableName ='PRM1'+cResult
>cTableString = ;
>'create table '+cTableName+' ( '
>cTableString = cTableString+' nEmpID n(16,0) , '
>cTableString = cTableString+' cLastname c(64) ,  '
>cTableString = cTableString+' cFirstName c(64) , ' 		
>cTableString = cTableString+' tHireDate t(8) , '
>cTableString = cTableString+' cIsTerm c(32) , '
>cTableString = cTableString+' cNTName c(32) '
>cTableString = cTableString+' )'		
>? cTableString
>&cTableString
>
>
>But now I am stuck in macro substituion land.
>
>How do I get out of that?
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform