|
Re: Programmatically DB access connection via DTP on Eclipse 3.5 (Galileo) [message #491503 is a reply to message #490663] |
Wed, 14 October 2009 15:42  |
Eclipse User |
|
|
|
That's very odd...
If "test" is showing up as a database profile in the data source
explorer... This should do the trick:
IConnectionProfile profile =
ProfileManager.getInstance().getProfileByName("test");
Can you tell me a bit about the code where you're trying to get the
profile handle from? Is it in a RCP app? If so, can you try doing the
same thing in the Eclipse Workbench?
--Fitz
lero@email.it wrote:
> I don't understand how to connect code-side to my Connection Profile
> created in the Database Development Perspective.
>
> My tree is here:
>
> Database Connections
> - test (MySQL v. 5.0.0)
> -- test
> ---Authorization IDs
> ---Schemas
> ---- ...
>
> I changed perspective to Plug-in development coding
> IConnectionProfile profile =
> ProfileManager.getInstance().getProfileByName("test");
> without any result.
>
> I also tried this:
>
> IConnectionProfile[] profile =
> ProfileManager.getInstance().getProfiles();
> logger.info("!! profiles " + profile.length);
> for (IConnectionProfile iConnectionProfile : profile) {
> logger.info("!! iConnectionProfile ************************ ");
> logger.info("!! getName "+iConnectionProfile.getName());
> logger.info("!! getDescription
> "+iConnectionProfile.getDescription());
> logger.info("!! getInstanceID
> "+iConnectionProfile.getInstanceID());
> }
>
> but the length of profiles is always empty (returning 0).
>
> What else can I do? :|
>
> Thank you in advance,
>
> Le
|
|
|
Powered by
FUDForum. Page generated in 0.06268 seconds