|
|
|
|
|
|
|
|
|
|
|
Re: Programmatically access a JDBC connection via DTP [message #491497 is a reply to message #489429] |
Wed, 14 October 2009 19:35 |
Brian Fitzpatrick Messages: 500 Registered: July 2009 |
Senior Member |
|
|
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
>
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05920 seconds