Hello everyone.
I have a little problem, I wrote a class in AX 2009 witch imports data from a DB2 database. For the connection I use ODBC (System-DNS).
The class runs directly without any problems, only as batch job, I get an error: The user can not login to Database. But tht user and the password are part of the odbc settings.
public void run()
{
loginProperty loginProperty = new LoginProperty();
ODBCConnection odbcConnection;
Statement sql;
ResultSet result;
;
//BP Deviation documented
loginProperty.setDSN('DNSNAME');
//BP Deviation documented
odbcConnection = new ODBCConnection(loginProperty);
if (odbcConnection)
{
//BP Deviation documented
sql = odbcConnection.createStatement();
//BP Deviation documented
result = sql.executeQuery("Select * from DEMOTbl");
while (result.next())
{
......
}
*This post is locked for comments