(I can create a static sqlmap factoryinstance to have it select a datasource before inst, but how to go the other way, have a map select a static data source?).

I have a bunch of maps (sql commands).
And a bunch of data source to different dbs.

I want to select late what data source to use based on a map name. Ideas?

Idealy I can add an xml element to the statements, ex
<insert    id="usrJoin"  ds="main" ....
and then in the sqlmap helper write
if (sqlmap.getDS(mapName)=="main" ) then {
// execute map with main data source staticly bound

The thing is that sometimes a table moves from one db to another for good resons mostly, (it just does, the 3 dba's hate me I am sure of it).

So... ideas how to hack? As I write this... I could create a xml properties files of map name/data source... but that is 2 files to maintain. I guess I will do that.... but if somone can save me, please do.
Show me some love!


.V




Reply via email to