Hi Dan
you can also use "run command mycommand" where mycommand is a string
like that :

Dim mycommand as String
mycommand = "Create Table"+chr$(34)+ "mynewtablename"+chr$(34)+"(field1
Char(10)) file"+chr$(34)+ "c:\temp\mynewtablename.TAB"+chr$(34)+" TYPE
NATIVE Charset+chr$(34)+ "WindowsLatin1"+chr$(34)
run command mycommand

The string "mycommand" rebuilt the create table statement but with this
kind of syntax you can specify the parameter you want even to create non
native table like dbf or ascii

I hope this could help you

stephane


> "Clark, Daniel (CRTLDN)" a écrit :
> 
> Hi List,
> 
> Is it possible to use a string variable as the table name in the
> MapBasic 'Create Table' statement? (ie the variable contains a user
> specified table name from a dialog)
> 
> I have tried the following:
> 
> Create Table UserTable (Ring Smallint, Radius Smallint,
>         Units Char(10), Statistics Smallint)
> File TableName
> Create Map For Buffer
> 
> Where UserTable is the variable containing the name of the table as
> specified by the user. When this is run I get the message "Expression
> does not evaluate to a column or table name"
> 
> Any help will be apprieciated.
> 
> Dan Clark
> 
> (  Tel  +44 20 7842 5066
> Ê Fax  +44 20 7842 5276
> *  [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to