Progress 9.1B (with Database version 9/8) create/edit/delete tables column

slh

Member
Hi,

I am using Progress 9.1B, but not sure which database its using (Eg: SQL92 or anything earlier/later).- Anyone knows how to check the version of database ?

Anyhow, I would like to check if its possible to programatically create/edit/delete/modify tables columns programatically.

As I understand SQL92 is capable of doing it using SQLiStatement.

Or I may have misinterpret its functions. Anyone can assist to shed some light ?
 

Casper

ProgressTalk.com Moderator
Staff member
Use the data dictionary to create, modify, delete tables. Use ABL (4GL in your case :) ) to manipulate the data.
If you want to use SQL then upgrade to the latest version (OE 10.2B) or at least to 9.1E04.

Regards,

Caspr.
 

medu

Member
There is some 'limited' DDL support in Progress versions that supports SQL92, not sure about 9.1B but you might be able to check whether supports SQL92 or not by using meta-data if you connect through JDBC using an SQL client like Squirrel SQL.

But even if you have SQL92 the things are a bit more complicated, almost the only thing you can do to an existent table that was created in 4GL is to drop it... alter table works only on tables that were created with SQL schema (through create table SQL statement), those table will be visible on Progress 4GL side just that you have to pay attention on data-type that you choose for table columns because some of them are not supported in 4GL and you are not going to be able to access the data in those columns (like char for instance, it gets to 'fixchar' that 4GL can't use it for any reason).
 

tamhas

ProgressTalk.com Sponsor
Do you actually have a requirement to make the change programmatically? If not, the easy and sensible thing is to just use the data dictionary to make the changes.

Don't try manipulating the ABL schema with SQL. Not impossible entirely, but many, many pitfalls, not the least of which is that SQL datatypes and ABL datatypes are different and if you create fields using SQL they will have SQL datatypes that ABL won't understand.

If you need to automate the process, e.g., to apply the same changes to multiple databases, then create the changes manually in one DB, attach an unchanged DB, and then use the data dictionary to create an incremental .df file which will change the unchanged DB to the changed DB schema. You can then use the data dictionary to quickly apply this same set of changes to as many databases as you want and you will have a nice record of the changes. It is possible to hand write incremental .df files, but I see no good reason to do so.

And, if that doesn't satisfy you, the data dictionary is all ABL code and you have the source in a .pl so you could extract it and do what you want. The usual thing is just to call individual programs with appropriate parameters, e.g., to apply a .df from a menu without having to go to the data dictionary. Sensible thing for an AP, but not really useful for an end user site.
 

slh

Member
Hi Tamhas,

Thanks for replying, the constraint here is to update the tables without actually shut down database. Understand that the work can be done in Data Dictionary, Procedure Editor.

Not sure what is the ABL refered to in your message though I saw a couple of times from other user as well.
 

tamhas

ProgressTalk.com Sponsor
ABL = Advanced Business Language is simply the rebranding of the same Progress 4GL that I think occurred about 8 years ago.

With an 11 year old release, I think you are out of luck for on-line schema changes, regardless of the technology you use.
 
Top