Friday, December 26, 2008

Advantage Configuration Forms

I have been working on updating the Advantage Visual Studio demos over the past week. With the Christmas break I am a bit further behind than I wanted to be but I was able to get a lot of work done. Take a look for the updated demos, including VS2008 solutions to be available from Code Central in early January.

In the meantime I wanted to discuss some of the improvements that I have made. The current samples were written in VS2003 so I have made an effort to update them for VS2005 and VS2008. For example, the applications use a custom application settings class instead of using the built-in classes included with VS2005 and newer. I have changed the code to use these built in settings classes.

Ensuring that demos have the proper settings can be problematic since everyone has a different environment. We can’t always rely on the demos to be installed in the same place or with a pre-determined directory structure. In an effort to make the demos more flexible and customizable I have added configuration screens. There are two versions one for basic configuration and the other for advanced configuration. I am considering combining them into a single form with a "more >>" type button but I am not sure yet.

The basic configuration form is similar to the open form dialog in Advantage Data Architect. It allows the user to specify the path, username, password, table type, character type, server type, locking mode, exclusive, read only and rights checking. When the form loads the values for each of these options is loaded from the application settings file. When the OK button is pressed the settings are saved. The basic configuration form is shown below.


  The advanced configuration dialog allows the user to specify all of the configuration options. Details about these settings can be found in the help file under the AdsConnection.ConnectionString property.


I am still doing some testing but I will get all the source code posted to Code Central as soon as it is done.

No comments: