Print Page | Close Window

SQLLoader.mdb (advanced)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
Printed Date: 22 Sep 2020 at 1:02pm
Software Version: Web Wiz Forums 12.03 -

Topic: SQLLoader.mdb (advanced)
Posted By: Roger Carlson
Subject: SQLLoader.mdb (advanced)
Date Posted: 21 Jul 2008 at 11:13pm

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


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.

Access 97 (30 KB): - uploads/5/
Access 2000 DAO (56 KB): - uploads/5/

Consider donating $1 per sample downloaded," rel="nofollow - find out why here .<

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 -
Copyright ©2001-2019 Web Wiz Ltd. -