hi all,
i built SQL sentences that are making tables dinamicly,
my problem is that everytime a table is going to be made,the is a
message asking for approval of the make table.
how can i make the table without this message?
You should look for a Microsoft Access 2000 Technical Article,
Fundamental Microsoft Jet SQL for Access 2000.
An example of a Make Table query:
Dim cmd As New ADODB.Command
Dim strSQL As String
cmd.ActiveConnection = CurrentProject.AccessConnection
strSQL = "CREATE TABLE MediaOptions " & _
"(media_type INTEGER NOT NULL PRIMARY KEY, " & _
"description CHAR(10) NOT NULL, " & _
"price DECIMAL(12, 4) NOT NULL, " & _
"CHECK (price >= 0.00)); "
cmd.CommandText = strSQL
cmd.Execute
'Debug.Print "Table MediaOptions created."
strSQL = "CREATE TABLE Sales " & _
"(sales_ticket INTEGER NOT NULL, " & _
"CONSTRAINT validate_sales_ticket " & _
"CHECK (sales_ticket LIKE '[0-9][0-9][0-9][0-9][0-9]'), " & _
"media_type INTEGER NOT NULL " & _
"References MediaOptions(media_type) " & _
" ON UPDATE CASCADE, " & _
"sale_date DATETIME DEFAULT Now() NOT NULL);"
cmd.CommandText = strSQL
cmd.Execute
'Debug.Print "Table Sales created."