Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9110

Re: Error in Java in replaceConnection when report contains sql expression fields

$
0
0

Hi Don.

 

I've spent way too much time on this issue already and we have a workaround, so I'm ready to give up.

 

On the chance that its a trivial problem, here's the code we use for replacing the connection:

 

IConnectionInfo newConnectionInfo = new ConnectionInfo();

PropertyBag propertyBag = new PropertyBag();

propertyBag.put("Trusted_Connection", "b(false)");

propertyBag.put(PropertyBagHelper.CONNINFO_SERVER_TYPE, "JDBC (JNDI)");

propertyBag.put(PropertyBagHelper.CONNINFO_JDBC_DATABASECLASSNAME, "foo");

propertyBag.put(PropertyBagHelper.CONNINFO_JDBC_CONNECTION_URL, "foo");

propertyBag.put("Use JDBC", "true");

propertyBag.put(PropertyBagHelper.CONNINFO_URI, "foo");

propertyBag.put(PropertyBagHelper.CONNINFO_DATABASE_DLL, "foo");

newConnectionInfo.setAttributes(propertyBag);

newConnectionInfo.setUserName("foo");

newConnectionInfo.setPassword("foo");

newConnectionInfo.setKind(ConnectionInfoKind.SQL);

 

int replaceParams = DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB;

databaseController.replaceConnection(oldConnectionInfo, newConnectionInfo, null, replaceParams);

 

Tables tables = databaseController.getDatabase().getTables();

for (int i = 0; i < tables.size(); i++) {

  ITable table = tables.getTable(i);

  table.setQualifiedName(table.getName());

  databaseController.setTableLocation(tables.getTable(i), table);

}


Viewing all articles
Browse latest Browse all 9110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>