Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What's the point of an ODBC driver if I have to hard code a username and password into my program?
Qt 6.11 is out! See what's new in the release blog

What's the point of an ODBC driver if I have to hard code a username and password into my program?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 614 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Core2
    wrote on last edited by
    #1

    The project I'm working on has me jumping back and forth between C++ and Qt Framework. (The significance of that sentence will become clear in a bit, bear with me) I have to communicate with a SQL db in both my C++ program and my Qt program. I had my Qt program running correctly. It was my first Qt program and I harvested a lot of examples offline to get it working. It could comm with the db add, modify, and return data. Once working with the C++ program I changed the user password. Then without thinking jumped back to my Qt program. Of course it wouldn't work . I found the issue but it made me think, what is the point of a ODBC driver, I have to enter a username and password in it to get the ODBC driver working? Does it not store this information? I would prefer not hard coding the username and password in the Qt program because if I ever have to change them I don't want to recompile my program and add it to the comps i'm working with to get everything working again. I would prefer to just update the ODBC driver and everything is happy again.

    Am I missing something here?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by SGaist
      #2

      Hi,

      I'm not used to ODBC, but generally, if a username and password is required for something, it's usually done in the application settings rather than hardcode it.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved