Mercurial > mxd2map
changeset 197:cdbf2f2dca35
Check for database connectio user parameter for SDE connections.
author | raimund renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 20 Jul 2011 17:56:29 +0200 |
parents | 5350621a0294 |
children | 6db0677a6450 c56547b228f9 |
files | ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jul 20 17:51:38 2011 +0200 +++ b/ChangeLog Wed Jul 20 17:56:29 2011 +0200 @@ -1,3 +1,9 @@ +2011-07-20 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Check for database connectio user parameter for SDE connections. + Set default "sde" if attribute is missing. + 2011-07-20 Raimund Renkert <raimund.renkert@intevation.de> * src/java/de/intevation/mxd/writer/MapScriptWriter.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Wed Jul 20 17:51:38 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Wed Jul 20 17:56:29 2011 +0200 @@ -268,10 +268,16 @@ layer.setConnectionType( MS_CONNECTION_TYPE.MS_PLUGIN.swigValue(), MS_BINDIR + "/ms/plugins/msplugin_sde_93.dll"); + String database_auth = layerElement.getAttribute("database"); + if (database_auth.equals("") || database_auth == null) { + logger.warn("Could not set the database connection user." + + " Setting to \"sde\" as default."); + database_auth = "sde"; + } layer.setConnection( layerElement.getAttribute("server") + "," + "port:" + layerElement.getAttribute("instance") + "," + - layerElement.getAttribute("database") + "," + + database_auth + "," + layerElement.getAttribute("user") + ",<PASSWORD>"); layer.setData( layerElement.getAttribute("data_source") +