Hello,
I am trying to create Tables in a database using DirectSQL() function. There are 3 scenarions:
- DirectSQL("DRIVER=SQLite3 ODBC Driver; Database=Output.db","CREATE TABLE April2121 (Field1 INTEGER)"); Here the procedure is succesfully executed
- DirectSQL("DRIVER=SQLite3 ODBC Driver; Database=Output.db","CREATE TABLE 20210421 (Field1 INTEGER)"); Here it generates an error
- DirectSQL("DRIVER=SQLite3 ODBC Driver; Database=Output.db",FormatString("CREATE TABLE %s (%s INTEGER)",CurrentDate, Field1)); Here it generates an error
I need to create tables with names taken from string parameter “CurrentDate” and Column Name taken from string parameter “Field1”
Current Date string parameter is defined as CurrentToString("%c%y-%m-%d").
Could you please tell me where I am going wrong with this? I have attached screenshots for your reference.
Thanks.