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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to connect an external database from SSRS RDP class in AX 2012

(0) ShareShare
ReportReport
Posted on by 5,680

Hi all,

i am trying to develop a new SSRS report usign RDP class and data get from external database odbc connection.

when run a report i getting below error:

Error      1             

An exception occurred in the query metadata execution. The exception is ODBC operation failed.

Unable to log on to the database.

[Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

Object 'OdbcConnection' could not be created. Dar_RFQCompReport.CopyOfRFQCompare [Preview]   0              0               

*This post is locked for comments

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

    Error clearly indicates that your connection is not successful with database.

    Please check the following link: msdn.microsoft.com/.../ms712362(v=vs.85).aspx

    The following code may help you:

    //Database connection classes

    OdbcConnection      odbcConnection;

    LoginProperty       loginProperty;

    SysSQLSystemInfo    systemInfo;

    // Database result fetching

    Statement           statement;

    //Initializtion

    loginProperty     = new LoginProperty();

    systemInfo        = SysSQLSystemInfo::construct();

    loginProperty.setServer(systemInfo.getLoginServer());

    loginProperty.setDatabase(systemInfo.getloginDatabase());

    odbcConnection = new OdbcConnection(loginProperty);

    // Create new Statement instance

    statement = odbcConnection.CreateStatement();

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans