Skip to main content



      Home
Home » Eclipse Projects » DTP » Programmatically access a JDBC connection via DTP
Programmatically access a JDBC connection via DTP [message #596471] Wed, 30 September 2009 13:24 Go to next message
Eclipse UserFriend
Is there any external documentation/example showing how to programmatically access a JDBC connection via DTP and create/populate tables via DTP. I am trying to develop a plugins which requires JDBC connection to persistent some of the data in database.

Thanks.

Joshua
Re: Programmatically access a JDBC connection via DTP [message #596491 is a reply to message #596471] Wed, 30 September 2009 15:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi Joshua...

What exactly are you trying to do?

Do you have a JDBC connection instance and want to use it in DTP? Or do
you have connection details that you want to leverage to create the
applicable DTP connections so you can get to the underlying database model?

More information about your goal will help me tailor an example for you.

Thanks
--Fitz

Joshua Hui wrote:
> Is there any external documentation/example showing how to
> programmatically access a JDBC connection via DTP and create/populate
> tables via DTP. I am trying to develop a plugins which requires JDBC
> connection to persistent some of the data in database.
>
> Thanks.
>
> Joshua
Re: Programmatically access a JDBC connection via DTP [message #596567 is a reply to message #596471] Fri, 02 October 2009 19:15 Go to previous messageGo to next message
Eclipse UserFriend
Hi Fitz,

It will be the latter one which is to execute the DDL file using the IConnectionProfile.

Also, if not all the properties are specified (i.e. arePropertiesComplete() is false), can I bring up the same properties dialog to allow user to enter the valid connection information? If so, which command should I use?

Thanks for your help!

Joshua
Re: Programmatically access a JDBC connection via DTP [message #596654 is a reply to message #596567] Wed, 14 October 2009 15:35 Go to previous message
Eclipse UserFriend
Ok... First, the DDL question... The only example I can find is this:

private void executeDDL(String[] sqlStatements,
IConnectionProfile connectionProfile) {
DatabaseIdentifier databaseIdentifier = new DatabaseIdentifier(
connectionProfile.getName(), "");
if (databaseIdentifier != null) {
try {
Job job = new GroupSQLResultRunnable(null, sqlStatements, null,
null, databaseIdentifier, false, new HashMap(),
Messages.BaseExecuteAction_group_exec_title,
"Generate DDL");
job.setName(Messages.BaseExecuteAction_job_title);
job.setUser(true);
job.schedule();

PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getActivePage().showView(EditorConstants.RESULTS_VIEW);
} catch (Exception e) {
}
}
}

For the ability to pop up the property page as we do, check out
ConnectAction in o.e.d.connectivity.ui in the
o.e.d.connectivity.ui.actions package. The public void run(IAction
action) method pops up the dialog.

--Fitz

Joshua Hui wrote:
> Hi Fitz,
>
> It will be the latter one which is to execute the DDL file using the
> IConnectionProfile.
>
> Also, if not all the properties are specified (i.e.
> arePropertiesComplete() is false), can I bring up the same properties
> dialog to allow user to enter the valid connection information? If so,
> which command should I use?
>
> Thanks for your help!
>
> Joshua
>
Previous Topic:Programmatically access a JDBC connection via DTP
Next Topic:Programmatically DB access connection via DTP on Eclipse 3.5 (Galileo)
Goto Forum:
  


Current Time: Wed Jul 23 13:37:27 EDT 2025

Powered by FUDForum. Page generated in 1.07793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top