ODBC connection to external data

不问归期 提交于 2019-12-08 05:26:27

Why not make a system or user DSN?

This will establish a driver for the connection. You do not need to specify server or database.

All our interfaces use this and it works, we store our connection parameters, ie database name and database server name in a table, note the DSN is commented out, so is not necessary:

loginProperty = new LoginProperty();
loginProperty.setServer(ImportJournalParameters.ExternalServerName);
// loginProperty.setDSN("ServerSQL10");
loginProperty.setDatabase(ImportJournalParameters.ExternalDBName);
connection = new OdbcConnection(loginProperty);
info('Login Process Successful - connection established');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!