Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Table Confusion?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00456897
Message ID:
00456904
Views:
29
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
Previous
Reply
Map
View

Click here to load this message in the networking platform