Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

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

(0) ShareShare
ReportReport
Posted on by 518

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
    518 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
    518 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
    8,816 Moderator 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
    101,158 Moderator 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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans