Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » How do I create a Connection Profile
How do I create a Connection Profile [message #594641] Thu, 12 March 2009 01:54
Mark Leone is currently offline Mark LeoneFriend
Messages: 123
Registered: July 2009
Senior Member
I'm trying to use DTP programmatically, but all the documentation I've
found just addresses how an administrative user sets up connections
through the eclipse UI. Can someone tell me where I might find something
that explains how to use the API. I'm not smart enough to figure out how
to use a barely-documented API of this complexity, but I'm sure I could
figure it out if I saw an example or an explanation of some sort.

Actually I think I just need to know how to create a connection profile.
I have code that creates a driver instance, and I know how to create a
connection if I hand it a connection profile; but I can't figure out how
to create a profile, presumably using the driver instance I created.

I execute the following code and get a NullPointerException where
indicated, which I take to indicate that I need to create a profile first.

ProfileManager pfm = ProfileManager.getInstance();
if (pfm == null){
System.err.println("No ProfileManager");
IConnectionProfile[] profiles = pfm.getProfiles(); //NPE occurs here
for(IConnectionProfile profile : profiles){
System.out.println("Profile name: " + profile.getName());
System.out.println("Profile ID: " + profile.getInstanceID());

And here's how I create the driver instance:

mgr.createNewDriverInstance(templateStringID, templateName,
Previous Topic:Reverse engineer DBSchema to XSD
Next Topic:Reverse engineer DBSchema to XSD
Goto Forum:

Current Time: Mon May 21 21:01:26 GMT 2018

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

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

Back to the top