Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Select Data Source pops up

Select Data Source pops up

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelp
3 Posts 3 Posters 2 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.
  • S Offline
    S Offline
    Shiva Prasad
    wrote on last edited by
    #1

    Hi, I am new to DB programming. I get a dialog during the execution of programming when using Database "Select Data Source" dialog. I had already created a CDatabase object and initialized the DSN name, user name password in the OpenEx() call of it. When I try to use the CRecordSet object to access the database, this dialog box pop up. I cross checked the ODBC DSN name and it is set right. why this dialog box pops up in between.. Can someone help me out on this. thanks,

    D M 2 Replies Last reply
    0
    • S Shiva Prasad

      Hi, I am new to DB programming. I get a dialog during the execution of programming when using Database "Select Data Source" dialog. I had already created a CDatabase object and initialized the DSN name, user name password in the OpenEx() call of it. When I try to use the CRecordSet object to access the database, this dialog box pop up. I cross checked the ODBC DSN name and it is set right. why this dialog box pops up in between.. Can someone help me out on this. thanks,

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      What do your call(s) to CDatabase::OpenEx() and CRecordset::Open() look like?


      "A good athlete is the result of a good and worthy opponent." - David Crow

      "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

      1 Reply Last reply
      0
      • S Shiva Prasad

        Hi, I am new to DB programming. I get a dialog during the execution of programming when using Database "Select Data Source" dialog. I had already created a CDatabase object and initialized the DSN name, user name password in the OpenEx() call of it. When I try to use the CRecordSet object to access the database, this dialog box pop up. I cross checked the ODBC DSN name and it is set right. why this dialog box pops up in between.. Can someone help me out on this. thanks,

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        Try opening the database using CDatabase::OpenEx and specifying the CDatabase::noOdbcDialog flag. I have a feeling it's going to fail since the dialog is popping up because you haven't passed enough info in your connection string. The flag will prevent the dialog from popping up though! :) Mark

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups