Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - SQLLoader.mdb (advanced)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Please consider donating $1 per sample downloaded, (find out why here)

SQLLoader.mdb (advanced)

 Post Reply Post Reply
Author
Message
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 20 Feb 2008
Status: Offline
Points: 249
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: SQLLoader.mdb (advanced)
    Posted: 21 Jul 2008 at 11:13pm

Please consider donating $1 per sample downloaded, find out why here.
 

SQLLoader.mdb

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.

Discussion: 

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.

Download
Access 97 (30 KB):
uploads/5/SQLLoader97.zip
Access 2000 DAO (56 KB): uploads/5/SQLLoader2K.zip
Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down