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. Connection with mysql an Crecordset

Connection with mysql an Crecordset

Scheduled Pinned Locked Moved C / C++ / MFC
databasemysql
4 Posts 2 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.
  • S Offline
    S Offline
    Shivanand Gupta
    wrote on last edited by
    #1

    Hi i am using VC7 and i want to connect mysql 5.1 through odbc driver mysql 5.0. i have conncect database by cdatabase class . after successfuly open the database we called open method of Crecordset but it give exception. CRecordSet rs(m_db);// rs.open(CRecordSet::Dynaset,"Select * form Tablename",CRecordSet::none); above line guve exception aboiut dynaset. we are unable to call open function of Crecordset. but CRecordSet::snapshot work fine.

    C 1 Reply Last reply
    0
    • S Shivanand Gupta

      Hi i am using VC7 and i want to connect mysql 5.1 through odbc driver mysql 5.0. i have conncect database by cdatabase class . after successfuly open the database we called open method of Crecordset but it give exception. CRecordSet rs(m_db);// rs.open(CRecordSet::Dynaset,"Select * form Tablename",CRecordSet::none); above line guve exception aboiut dynaset. we are unable to call open function of Crecordset. but CRecordSet::snapshot work fine.

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Please check CDBException::m_strError: it should give you useful info about the problem. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      S 1 Reply Last reply
      0
      • C CPallini

        Please check CDBException::m_strError: it should give you useful info about the problem. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        S Offline
        S Offline
        Shivanand Gupta
        wrote on last edited by
        #3

        i got proper exception in case of "Creordset::dynaset". How can call open method of Crecordset with Creordset::dynaset to fetch record from Mysql

        C 1 Reply Last reply
        0
        • S Shivanand Gupta

          i got proper exception in case of "Creordset::dynaset". How can call open method of Crecordset with Creordset::dynaset to fetch record from Mysql

          C Offline
          C Offline
          CPallini
          wrote on last edited by
          #4

          shivanandgupta wrote:

          i got proper exception in case of "Creordset::dynaset".

          What is 'proper exception'? Why didn't you report the erreor message? :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          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