Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
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 2024 Season 1 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,156 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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans