Solved

DriverManagerDataSource in java spring?

Posted on 2013-10-29
1
907 Views
Last Modified: 2013-11-29
Hi,

Is there a property to designate the database schema name in the datasource config file?
Is it possible to name the schema  namehere in the datasource config file?
Right now ,the schema name is in the sql itself:

String sql="select * from schema_name.table_name";

Open in new window

<bean id="dataSource"
		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
		<property name="driverClassName" value="${db2.jdbc.driverClassName}" />
		<property name="url" value="${db2.jdbc.url}" />
		<property name="username" value="${db2.jdbc.username}" />
		<property name="password" value="${db2.jdbc.password}" />
	</bean>

Open in new window

0
Comment
Question by:dkim18
1 Comment
 

Accepted Solution

by:
dkim18 earned 0 total points
ID: 39609405
I think I found it.

currentSchema=
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now