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. vc 2005 CDatabase compile error

vc 2005 CDatabase compile error

Scheduled Pinned Locked Moved C / C++ / MFC
c++databasehelpquestion
4 Posts 3 Posters 0 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.
  • N Offline
    N Offline
    ns
    wrote on last edited by
    #1

    The project can recognise CString, but when I went to use CDatabase I got the error CDataBase db; do stuff with db.... 'CDatabase' : undeclared identifier. Do I need to include something? I thought since the project has MFC support it would automatically recognise CDataBase. thanks, sb

    M D 2 Replies Last reply
    0
    • N ns

      The project can recognise CString, but when I went to use CDatabase I got the error CDataBase db; do stuff with db.... 'CDatabase' : undeclared identifier. Do I need to include something? I thought since the project has MFC support it would automatically recognise CDataBase. thanks, sb

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

      I'm not sure why you think the compiler would automatically recognize any unknown types... You probably need to include afxdb.h Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      N 1 Reply Last reply
      0
      • M Mark Salsbery

        I'm not sure why you think the compiler would automatically recognize any unknown types... You probably need to include afxdb.h Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        N Offline
        N Offline
        ns
        wrote on last edited by
        #3

        how right you are! It worked. thanks Mark. sb

        1 Reply Last reply
        0
        • N ns

          The project can recognise CString, but when I went to use CDatabase I got the error CDataBase db; do stuff with db.... 'CDatabase' : undeclared identifier. Do I need to include something? I thought since the project has MFC support it would automatically recognise CDataBase. thanks, sb

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

          ns wrote:

          Do I need to include something?

          Yes, read here (near the bottom) for what.


          "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
          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