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.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=265
Printed Date: 22 Sep 2020 at 1:02pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


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, http://www.rogersaccesslibrary.com/whydonations.htm - 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):
http://www.rogersaccesslibrary.com/forum/uploads/5/SQLLoader97.zip - uploads/5/SQLLoader97.zip
Access 2000 DAO (56 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/SQLLoader2K.zip - uploads/5/SQLLoader2K.zip

-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net