I am trying to go through an arraylist and create some database tables for each entry in the array. what I have is
Dim ques As String
For Each ques In questions
query = "create Table " + ques + " (plantid nvarchar(100), Answer nvarchar(100))"
cmd = New SqlCeCommand(query, con)
cmd.ExecuteNonQuery()
Next
I am wanting to use the item in the arraylist as the name of the db. I am getting an error saying
There was an error parsing the query. [ Token line number = 1,Token line offset = 14,Token in error = 1 ]
Can anyone see what I am doing wrong.

creating tables
Davidwv
Have a look at the help for the CREATE TABLE statement, and review what constitutes a valid table name.
As per http://msdn2.microsoft.com/en-US/library/ms174979(SQL.90).aspx:
Is the name of the new table. Table names must follow the rules for identifiers. table_name can be a maximum of 128 characters, except for local temporary table names (names prefixed with a single number sign (#)) that cannot exceed 116 characters.
Try putting square brackets around your table name - ie. start the query with something like:
CREATE TABLE [1] ...
rather than
CREATE TABLE 1 ...
This lets SQL server know that you're specifying a name, rather than using a reserved identifier
kufu
FerroFlunky
can I not use 1,2,3 as table names.
Joketery