Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Error: OBDC operation failed. Unable to log on database.

Posted on by 502

Hi All,

Error:

OBDC operation failed. Unable to log on database. 

Object OBDC connection could not be created.

Below is the code which am running.

    loginProperty = new LoginProperty();
    loginProperty.setDSN("SqlServerTest");
    loginProperty.setDatabase("WorkPay");

    odbcConnection = new OdbcConnection(loginProperty);
    if(odbcConnection)

MicrosoftTeams_2D00_image-_2800_28_2900_.png

Can someone please help me on this. What is the reason behind the error?

Thanks and regards

Siddhant Singh

  • Suggested answer
    Siddhant Singh Profile Picture
    Siddhant Singh 502 on at
    RE: Error: OBDC operation failed. Unable to log on database.

    Hi all,

    Please find below link, this also help me.

    axvuongbao.blogspot.com/.../how-to-create-dsn-and-connect-to.html

    Thanks and regards

    Siddhant Singh

  • Siddhant Singh Profile Picture
    Siddhant Singh 502 on at
    RE: Error: OBDC operation failed. Unable to log on database.

    Hi Nikoloas/ Ergün,

    I am getting this error on configuration level. How can we fix this?

    MicrosoftTeams_2D00_image-_2800_29_2900_.png

    Thanks and regards

    Siddhant Singh

  • Verified answer
    ergun sahin Profile Picture
    ergun sahin 8,812 Super User on at
    RE: Error: OBDC operation failed. Unable to log on database.

    Did you create DSN

    docs.microsoft.com/.../how-to-connect-to-an-external-database-from-x-code

    Edit: Sorry for a moment I thought you were connecting to an external db

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,148 on at
    RE: Error: OBDC operation failed. Unable to log on database.

    Hi Siddhanth,

    you're not providing any username or password. That's why it fails and that's the reason behind the error.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans