web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

"Invalid connection string attribute" error when validating the ODBC connection - DIXF

(0) ShareShare
ReportReport
Posted on by

Dear community,

I received this error message when I tried to validated my ODBC connection with the DIXF modul.

ODBC-error.png

I already changed my ODBC configuration to 32/64 Bit, used a system-/user-DSN on AOS and client.

Microsoft SQL Server ODBC Driver Version 06.03.9600

Running connectivity tests...

Attempting connection
Connection established
Verifying option settings
Disconnecting from server

TESTS COMPLETED SUCCESSFULLY!

When I'm using the follwing job there isn't a error message.

static void mod_ODBC_Test(Args _args)
{
    LoginProperty loginProperty;
    OdbcConnection odbcConnection;
    Statement statement;
    str sql, criteria;
    SqlStatementExecutePermission perm;
    ;

    // Set the information on the ODBC.
    loginProperty = new LoginProperty();
    loginProperty.setDSN("ODBCTEST");
    loginProperty.setDatabase("my database");

    //Create a connection to external database.
    odbcConnection = new OdbcConnection(loginProperty);

    if (odbcConnection)
    {
        sql = "my sql statement"

//Assert permission for executing the sql string. perm = new SqlStatementExecutePermission(sql); perm.assert(); //Prepare the sql statement. statement = odbcConnection.createStatement(); statement.executeUpdate(sql); //Close the connection. statement.close(); } else { error("Failed to log on to the database through ODBC."); } }

We are using AX 2012 R3 CU9.

Thanks in advance.

Regards,

Moritz


*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Crispin,

    the DMF parameters are validated successfully and working with other source types.

    Regards,

    Moritz

  • Pravasti AK Profile Picture
    2,985 on at

    Hi Moritz,

    create a system dsn or user dsn with the ax database then modify code.

    Removed loginProp.setServer and

    loginProp.setDatabase

    and replaced it with loginProp.setDSN(“[insert DSN name here]”).

    you can use like below create connectionString and define the dsnName,UID,PWD for the databse of that DSN and pass that to the loginProperty class.

    ConnectionString=strfmt("DSN=%1;UID=%2;PWD=%3",DSN,UserName,Password);

    loginProperty = new LoginProperty(); Loginproperty.setOther(ConnectionString);

  • Community Member Profile Picture
    on at

    Hi,

    this is my configuration now:

    config.png

    Unfortunately I still had the error message, so I tried a different SQL Server in my own subnet and it is valdating correctly. 

    But this is still not logical for me, because it is possible with the job, so it shouldn't be network related issue.

    Regards,

    Moritz

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans