SQLLoader.mdb (expert)

Please consider donating $1 per sample downloaded, find out why here
Access 97 (30 KB)
This sample shows how to modify the structure of a Back-End 
database using SQL DDL (data definition language) statements.  The 
actual code is found in the Back-end database (SQLLoaderBE.mdb). 
 This application simply launches the code.  The two databases must 
be in the same directory for this to work.


Why would you want to do this?  Suppose you had a remote 
database application whose table structure you need to modify.  This
 application would allow you to send a text file to the remote location 
and have the users there update the table structures.

How does it work?  

First of all, you need to create a text file with the SQL statement in the 
exact order they need to be executed in.  (You will need to know 
something about SQL DDL.  I recommend "Access Database Design 
& Programming" by Steven Roman).  See the SQLLoaderText.txt and 
SQLLoaderText2.txt for examples.

Then you execute either of the ReadText functions in 
SQLLoaderBE.mdb (depending on how you structure your SQL 
statements).  The function will read and execute each statement in 
turn, modifying the structure of your database.

So if all of the code is in the Back-end, what does this form do?  You 
can use this as a launcher to start the programs ON THE BACK-END, 
thereby keeping your users hands off of it.  What's more is that you 
don't have to modify this form again to do the next update.  All that 
changes is the text file holding the SQL statements. 




Need Winzip?

Return to Main Page