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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. connec tion to ms access database

connec tion to ms access database

Scheduled Pinned Locked Moved C / C++ / MFC
database
5 Posts 4 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.
  • T Offline
    T Offline
    tejaswi teja
    wrote on last edited by
    #1

    hi canu please tell me h ow to connect to a database created in microsoft access and acces data sign CDatabase class.

    T V D 3 Replies Last reply
    0
    • T tejaswi teja

      hi canu please tell me h ow to connect to a database created in microsoft access and acces data sign CDatabase class.

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      tejaswi_teja wrote: tell me h ow to connect to a database created in microsoft access and acces data sign CDatabase class. Have a look here :- Access Database using CDatabase class[^]

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta VC Forum Q&A :- I/ IV

      1 Reply Last reply
      0
      • T tejaswi teja

        hi canu please tell me h ow to connect to a database created in microsoft access and acces data sign CDatabase class.

        V Offline
        V Offline
        vikas amin
        wrote on last edited by
        #3

        Here is a small code from a project for u CDatabase database; CString SqlString; CString sDeviceID,sDeviceName,sStatus; CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)"; CString sDsn; CString sFile = "D:\\PMR\\vc++\\conndevices.mdb"; // You must change path if it's different database // Build ODBC connection string sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,app_path); // Open the database database.Open(NULL,false,false,sDsn); CRecordset recset( &database ); // Build the SQL statement //DeviceOpen::m_devicename.GetWindowText(sDeviceName); SqlString="SELECT DeviceName FROM conndevices "; // Execute the query recset.Open(CRecordset::forwardOnly,SqlString,CRecordset::readOnly) Vikas Amin Embin Technology Bombay vikas.amin@embin.com

        1 Reply Last reply
        0
        • T tejaswi teja

          hi canu please tell me h ow to connect to a database created in microsoft access and acces data sign CDatabase class.

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

          This might help.


          "One must learn from the bite of the fire to leave it alone." - Native American Proverb

          T 1 Reply Last reply
          0
          • D David Crow

            This might help.


            "One must learn from the bite of the fire to leave it alone." - Native American Proverb

            T Offline
            T Offline
            tejaswi teja
            wrote on last edited by
            #5

            thank you all very much

            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