db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laura Stewart (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2851) Corrections to client DataSource access example in the Server and administration guide
Date Thu, 05 Jul 2007 17:25:04 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Laura Stewart updated DERBY-2851:
---------------------------------

    Derby Info: [Patch Available]

> Corrections to client DataSource access example in the Server and administration guide
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-2851
>                 URL: https://issues.apache.org/jira/browse/DERBY-2851
>             Project: Derby
>          Issue Type: Bug
>            Reporter: Kathey Marsden
>            Assignee: Laura Stewart
>            Priority: Minor
>         Attachments: derby2851.diff, radminnsdatasourcexmp.html
>
>
> http://db.apache.org/derby/docs/dev/adminguide/radminnsdatasourcexmp.html
> Shows an example for getting a connection through a DataSource by setting databaseName
to "mydb;create=true".  It should be changed to use "mydb" and use setCreateDatabase("create").
Also the comment that user/password are required is not correct.
> I think the getDS method can be removed and the example can just look like:
> org.apache.derby.jdbc.ClientDataSource ds =
>    new org.apache.derby.jdbc.ClientDataSource();
> // DatabaseName can include Derby URL Attributes
> ds.setDatabaseName("mydb");
> ds.setCreateDatabase("create");
> ds.setUser("user");
> ds.setPassword("mypass");
> // The host on which Network Server is running
> ds.setServerName("localhost");
> // port on which Network Server is listening
> ds.setPortNumber(1527);
> Connection conn = ds.getConnection();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message