SQLLoader.mdb (advanced) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
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. DownloadAccess 97 (30 KB): uploads/5/SQLLoader97.zip Access 2000 DAO (56 KB): uploads/5/SQLLoader2K.zip |
|
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |