Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

ODBC Batch Import - Error

$
0
0

 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())
        {
             ......
        }


Viewing all articles
Browse latest Browse all 73760

Trending Articles



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