mike chambers | about

Using data from a data base with objects that have required column names

Generator can use any data base with an ODBC or JDBC driver as a data source. This can be very useful.

However, some objects, such as the scrolling list object require that the data source contain certain columns (such as clip).

Of course one solution would be to change your tables column names to match those required by Generator. That however is not a good option, as it ties your data too closely too Generator.

Another option is to have Generator retrieve the data from some Middle Ware which would in turn connect to the data base and return a data source with the correct column names. However, that is a little over kill if all you are doing is changing the column names.

The third option is to us the AS statement in your sql to specify the column names in the result set returned to Generator.

Thus say you have a table call Weather with the following columns :

graphic, forecast, high, low

and we want to convert the graphic column to clip.

You SQL statement would look something like :

SELECT graphic AS clip, forecast, high, low from Weather

this would return a result set with the following columns :

clip, forecast, high, low

You can use the AS modifier more than once per statement, and use it on just about any thing that returns a value such as :

SELECT count(*) AS numDays from Weather
twitter github flickr behance