Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connecting to dynamic database using DataSource

843854Mar 15 2002 — edited Mar 16 2002
Hello,

I have been able to connect to databases successfully using a DataSource where my database name was known beforehand. However, I have a situation where I need to connect to different databases on the same database server, but I don't know what the names of the database will be beforehand.

Therefore, I need to define a generic datasource that points to the correct database server, and then I need to dynamically fill in the database name. Has anyone attempted this before?

I want to avoid having to create 15 different datasources that only differ in database names. I'd like to use one data source, and then dynamically connect to the database I need to use from there.

My DB is a Sybase db. Any help would be appreciated.

Thanks,

Michael
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2002
Added on Mar 15 2002
1 comment
372 views