Stefano Miceli
Stefano Miceli

Reputation: 273

Visual foxpro table name with variable

I have to modify an old software wrote in visual foxpro (latest version) My goal is to create some temporary tables with a non-fixed name (it depends on some variable). How can I write something like: variable1="table_name" Create table variable1 (field1 int, field2 int)

and have the output file table_name.dbf?

Upvotes: 0

Views: 1073

Answers (1)

Tom G
Tom G

Reputation: 56

Just a small change to what you wrote will do the trick:

variable1 = "table_name"
CREATE TABLE (variable1) (field1 int, field2 int)

Upvotes: 4

Related Questions