'''Q: How do I get the raw JDBC Connection from my connected connection profile?'''

'''Q: How do I get the raw JDBC Connection from my connected connection profile?'''

+

+

A: The ProfileConnectionManager class provides a method for retrieving a particular type of connection class from a connected profile. A "java.sql.Connection" is one of the two different types (the other being the ConnectionInfo class) you can retrieve for connected database connection profiles.

'''Q: How do I create a Transient connection profile vs. a Persisted profile?'''

+

+

A: Under the covers the only difference between a Transient and a Persisted connection profile is that when the workbench is closed, the Transient profile is not saved between sessions. So once you create it, you can do whatever you'd like with it - and it will be closed and not persisted when Eclipse is shut down.

+

+

To create the Transient profile, you have to know a bit more information than you do for a normal profile created via the UI. The trick for the transient profile is knowing all the bits and pieces you have to have ahead of time, like the:

+

+

* provider ID, which is the connection profile type ID

+

* vendor and version, which relate to the vendor/version of the database you're connecting to

+

* and then the driver path. Note that you can also use a pre-defined driver and get the DriverInstance from the DriverManager, then retrieve various properties like the vendor, version, class name, and driver path from there

Q: How do I get the raw JDBC Connection from my connected connection profile?

A: The ProfileConnectionManager class provides a method for retrieving a particular type of connection class from a connected profile. A "java.sql.Connection" is one of the two different types (the other being the ConnectionInfo class) you can retrieve for connected database connection profiles.

Q: How do I create a Transient connection profile vs. a Persisted profile?

A: Under the covers the only difference between a Transient and a Persisted connection profile is that when the workbench is closed, the Transient profile is not saved between sessions. So once you create it, you can do whatever you'd like with it - and it will be closed and not persisted when Eclipse is shut down.

To create the Transient profile, you have to know a bit more information than you do for a normal profile created via the UI. The trick for the transient profile is knowing all the bits and pieces you have to have ahead of time, like the:

* provider ID, which is the connection profile type ID
* vendor and version, which relate to the vendor/version of the database you're connecting to
* and then the driver path. Note that you can also use a pre-defined driver and get the DriverInstance from the DriverManager, then retrieve various properties like the vendor, version, class name, and driver path from there

Q: How do I get at the database model from my connected connection profile?

A: This is a little more difficult, but along the same lines of getting a JDBC connection. We just have a different connection type under the covers that lumps a reference to the Database model object with some other bits and pieces about the connection called "ConnectionInfo". Once you get the Database object you can use it like any other EMF model object - looking at its properties, child objects, and so on. Generally it's modeled the same way as JDBC is. From the Database object you can get a list of catalogs or schemas. From a schema you can get a list of tables, procedures, and so on.