DDL Query execution

A

Ale

Hi all,
how can I execute a large amount of DDL Queries on Access 2000?

I've a DDl/SQL Script file which defines a data structure with CREATE
TABLE, ALTER TABLE UPDATE TABLE, etc. etc.
I know how to execute this script on MySQL, MS Sql Server, but don't
know how execute it on access 2000 :(

Thank you all.
Bye

Ale
 
M

MAC

Hi all,
how can I execute a large amount of DDL Queries on Access 2000?

I've a DDl/SQL Script file which defines a data structure with CREATE
TABLE, ALTER TABLE UPDATE TABLE, etc. etc.
I know how to execute this script on MySQL, MS Sql Server, but don't
know how execute it on access 2000 :(

Thank you all.
Bye

Ale

I am not sure, but the querys in Access allow you to change the view
of the query to straight SQL.
I know that you can open a new query (Queries|New) and off the menu
bar View|SQL view.
This would allow you to enter in your SQL. I don't know if you would
be allowed to enter a series of
SQL Statements.

Hope this helps

MAC
 
M

Michael Gramelspacher

I will venture to say that it is not hardly practical. Each statement has to
be enclosed in double quotes and executed separately. There are also differences
in functions and delimiters. Just an example:

Sub CreateProductPricesTable()
With CurrentProject.Connection

..Execute _
"CREATE TABLE ProductPrices" & _
"(sku INTEGER NOT NULL" & _
", price_date CHAR(8) NOT NULL" & _
", price DECIMAL (12,2) NOT NULL" & _
", PRIMARY KEY (sku,price_date,price));"

End With
End Sub
 
A

Ale

Thanks to all.
I think i'll modify my sql script file using my text editor macros
adding

..Execute _ "

and

"

before and after each statement, and so i'll copy all statements in a
Access module. It should work, right?
Good bye.

Ale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top