SQL create file

J

JahMic

I've seen similar questions to this asked, but I haven't found a clear
answer to this. I have a SQL file that basically creates all the
tables and other predefined data. There are multiple statements, in
the range around 100. In most other databases, it is a somewhat
trivial task, to import this file in, however for access, I can't
figure it out... So, how can I do this? The data should be already in
Jet friendly dialect.

The schema will be periodically updated and will be a part of
continuous build process, so any variations of 'copy and paste each
individual statement into the SQL window' isn't to be viable.

I would be quite willing to make a quick c# app to do this as needed
and have pretty much worked out a quick and dirty design to do it, but
if there is a more established solution, I'd much rather use that.

Any help, much appreciated.

Regards, J
 
D

Douglas J. Steele

You could store each DDL statement as a separate row in a table, then open a
recordset that loops through that table, running each individual DDL
statement.
 

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