|
|
DBUpdater32
DBUpdater32 is an example of DBUpdater Technology.
you can download last version from here.
DbUpdater32 is a simple program which uses the DbUpdater technology.
The purpose is to let dbUpdater technology available to all peoples without require any fee.
In addition, its easy-to-use interface allows anybody to use DbUpdater really in five minutes.
In order to use the program in real application, there is no need to spend hours in learning how to use a complex component.
Moreover, such simplicity have a cost: the most advanced functionalities are unused. They still are present in the program but, in order to use them, a little more skill is required.
After installation, launch the DbUpdater32.exe file. The program will show a window like this in ScreenShot1.
In order to produce a database schema, it is necessary to specify the source database. You can hand-write the connection string or use the "Database connection string" to build visually the connection string. You can use the standard Microsoft window (suggested for SQL Server) or the DbUpdater windows, showed in Screenshot 2 -Connection String Builder . This window good for Sql Server as well, but is particularly suited for building connection string for other databases, such as Sybase Adaptive Server Anywhere, in which case, the standard Microsoft window lacks of some information.
The second page entitles "Run Schema".
Normally you don't want the end user see this window.
DbUpdater32 includes it for test purposes. In real application, the comparer and updater operations can be done with a batch file.
As you can see in Screenshot 3, there are some link label.
Let's see its usage:
"Settings: Load". Allows to load a configuration file previously prepared.
The configuration file is the same as the producer.
To set the advanced options, uses the same link as described in Schema Producer .
"Connection: Build". Open a window which help the connection string build.
"Package: Load". Load into memory a previously generated package.
When all information are available, it is possible to compare the client database with the original schema database.
The "Compare Package" does this job and produces a report containing all the differences between the two databases. In addition, the list of sql statements are generated and ready to use.
You can inspect this xml file (instructions.xml) located in DbUpdSql folder.
Finally, to actually synchronize the database, use the "Run Package" option.
When DBUpdater run package, two windows will give to the user information concerning the comparer and updater operations. A Console window will display information concerning the operations under elaboration; a Progress Info window will show two or three progress bar which will give an idea of the job done and the one still to be done.
BATCH FILE help you to run DBUpdater32 in silent mode like a win32 consolle application.
Screenshot 4 show you BAT page.
Only when launch DbUpdater32.exe without parameters, you will get the user interface showed in the screenshot included in this document.
This is not the better usage of DbUpdater32 in your redistribuitable applications.
In real application is common to encapsulate the compare and update routines inside a more general update procedure.
The DbUpdater32 allows to accomplish all operations with a batch command, it works in quiet mode so that it is easy to encapsulate inside other applications.
Note the program parameters - and this is the secret: if you provide parameters to program, the it will run in silent mode.
Moreover, the actual connection string and other setting parameters are known from inside the application which uses the database.
The better usage of the component is to:
- check the existence of a new package and, if so,
- run DbUpdater with, as first parameter, the connection string of the target database to update and, as second parameter, the package name containing the schema information of the source database.
The BAT page of DbUpdater32 program can be used to build a file batch to call from your application (i.e. using ShellCommand API).
Set the connection string and package name and then click the "Create batch file command". The program creates the batch command. To see its content, go to the "View Editor".
Even if DbUpdater32 is a simple program, is still possible to configure some (but not all) DbUpdater component advanced setting.
Go to the main page and then click on the "Open advanced settings" link. The program will show the window in Screenshot 5.
Here you can define table to rename, fields to rename and more..
Download full DBUpdater32 documentation from here
|
|