DB Structure of dynamically attached databases

Posted by Thomas Mercer-Hursh on 02-Jan-2008 13:47

Is there a reason that OEA couldn't show the DB structure of databases which have been attached dynamically by the code? I am doing some code where I would like to have the databases attached based on parameters so I have a little connect procedure to set up the aliases while I am coding and a startup procedure to run for the real execution, but these databases don't show up in the DB Structure view.

All Replies

Posted by Tim Kuehn on 02-Jan-2008 13:49

Doesn't the structure view use a JDBC connect?

Posted by Matt Baker on 02-Jan-2008 14:11

Yes, you are correct Tim. The database structure view uses a JDBC connection. The connection itself is managed through the database navigator plugin and information is shared with the OpenEdge project as needed. In fact, the database structure view as seen from the OpenEdge perspective is actually just the database structure view from the database navigator plugin. The connection information for an ABL database connection can be quite different from what is needed by a JDBC connection and is stored separately from the JDBC connection information.

Posted by Thomas Mercer-Hursh on 02-Jan-2008 14:21

Ah, yes, I see.

The use case is a situation where I am developing code which will be run from the command line and will derive database connections from stored parameters. I.e., the overall structure is a startup program that reads the parameters, establishes the connections and aliases, and then calls subprograms to do the work.

In development, I have a small procedure that I run once after opening OEA that makes the connections so that I can do syntax checking and compiling on the code under development and a small routine to disconnect them if I want to do a test run from a scratch condition.

So, what would be nice is to create the JDBC connection without the ABL connection. Is that possible?

Posted by Admin on 02-Jan-2008 14:23

You may create the JDBC connection profile from within the SQL Explorer perspective.

Mike

Posted by Thomas Mercer-Hursh on 02-Jan-2008 14:35

I presume you mean the DB Navigator perspective ....

How about that, it works! Neat.

Now, the one thing that seems to be missing there is the ability to get a printed report in the fashion one can from the data dictionary.

Posted by Admin on 02-Jan-2008 23:29

Posted by Matt Baker on 03-Jan-2008 10:24

The other option for testing is to set up a launch configuration that contains all the necessary parameters, propath and and your database script. This way you can keep testing in a separate AVM from that used for compiling code in your development environment.

You can access launch configurations from the run button drop-down on the main IDE toolbar.

Posted by Thomas Mercer-Hursh on 03-Jan-2008 11:05

I may give up and just make this work with externally defined database connections, but I still think that there is no reason not to be able to print a detailed report on a table from within OEA.

Given the relatively small number of modules in this project, the idea of two projects, one of which would have only one program in it, is not very attractive.

Posted by Thomas Mercer-Hursh on 03-Jan-2008 11:08

I'm not sure this buys me anything. If I am establishing the database connections via a startup script, then I can just create the DB connections in OEA. If I am trying to have the initial program create the connections based on stored parameters, then the Run As doesn't buy me anything new.

This thread is closed