Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to run SQL script to create table

Status
Not open for further replies.

monkeymeister

Programmer
Mar 17, 2005
58
GB
How do you run an SQL script in Access to create/alter tables? I'm trying to set up the ITCN forum on an Access database.

Any help would be really appreciated.


Cheers,

Mike
 
It would be very much quicker to create the table in the table designer than to write the code to do it.
 
Sorry, I musn't have made myself clear enough...all I want to do is the equivalent of going into Query Analyzer in SQL Server and executing a pre-written CREATE TABLE script to put tables on the Access database - I'm not looking to run any VBA code to do this. How do I do this, it must be pretty simple, but I just don't know how to go about it in Access.


Cheers,

Mike
 
replyed on thread183-1111532.


Please don't crosspost unless asked to do that by someone else on the forum, specially after so short period of time.



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
There is no equivalent to Query Analyzer in Access.
To do the same thing in ACcess you must execute individual lines of SQL using a VBA procedure, one at a time, to build your table and add the fields to it.

 
Lupins46

Please see the answer on the other thread, as it is perfectly possible to issue an individual create table using the SQL View.

Limited to one statementat the time, but still possible.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
'Limited to one statement at the time, but still possible'
That's what i said.

Who on earth would want to do that?
 
No you said "using a VBA procedure". This is not the same thing as using the SQL View.

Using the SQL View you can do SQL Statements on the fly, and with VBA it would give you more work to do the same.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top