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. how to connect to a database like postgresql or mysql?

how to connect to a database like postgresql or mysql?

Scheduled Pinned Locked Moved C / C++ / MFC
databasetutorialmysqlpostgresqllinux
6 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
    ThinkingPrometheus
    wrote on last edited by
    #1

    hiho cause i'm much more working on unix systems i just don't know how i can connect and do some SQL statements to a database like postgresql or mysql? for example, using linux i use libpq API with funktions like PQconnectdb or PQexec to connect or execute a query but how does this work under windows? can i use the same API on windows systems? i'm sure there are many guys here who know how this stuff works, but since i work most time with linux i just have no idea on how to do database programming on windows any articles or hints would be great thx@ll

    D E M 3 Replies Last reply
    0
    • T ThinkingPrometheus

      hiho cause i'm much more working on unix systems i just don't know how i can connect and do some SQL statements to a database like postgresql or mysql? for example, using linux i use libpq API with funktions like PQconnectdb or PQexec to connect or execute a query but how does this work under windows? can i use the same API on windows systems? i'm sure there are many guys here who know how this stuff works, but since i work most time with linux i just have no idea on how to do database programming on windows any articles or hints would be great thx@ll

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

      ThinkingPrometheus wrote:

      but how does this work under windows?

      See here.


      "The largest fire starts but with the smallest spark." - David Crow

      T 1 Reply Last reply
      0
      • D David Crow

        ThinkingPrometheus wrote:

        but how does this work under windows?

        See here.


        "The largest fire starts but with the smallest spark." - David Crow

        T Offline
        T Offline
        ThinkingPrometheus
        wrote on last edited by
        #3

        that seems a good resource but, just cause of interest: is there only odbc on windows? and for better understanding: is odbc just a API which is able to "talk" to databases? or can odbc do much more than just manage sql and its results? (i'm not sure about what i'm expecting, that's why i ask ;-) )

        D 1 Reply Last reply
        0
        • T ThinkingPrometheus

          that seems a good resource but, just cause of interest: is there only odbc on windows? and for better understanding: is odbc just a API which is able to "talk" to databases? or can odbc do much more than just manage sql and its results? (i'm not sure about what i'm expecting, that's why i ask ;-) )

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

          ThinkingPrometheus wrote:

          is there only odbc on windows?

          No. See here.


          "The largest fire starts but with the smallest spark." - David Crow

          1 Reply Last reply
          0
          • T ThinkingPrometheus

            hiho cause i'm much more working on unix systems i just don't know how i can connect and do some SQL statements to a database like postgresql or mysql? for example, using linux i use libpq API with funktions like PQconnectdb or PQexec to connect or execute a query but how does this work under windows? can i use the same API on windows systems? i'm sure there are many guys here who know how this stuff works, but since i work most time with linux i just have no idea on how to do database programming on windows any articles or hints would be great thx@ll

            E Offline
            E Offline
            Eric Dahlvang
            wrote on last edited by
            #5

            Did you Search Code Project Articles?[^] http://www.codeproject.com/database/dlgmysql.asp[^] ---------- Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peters

            1 Reply Last reply
            0
            • T ThinkingPrometheus

              hiho cause i'm much more working on unix systems i just don't know how i can connect and do some SQL statements to a database like postgresql or mysql? for example, using linux i use libpq API with funktions like PQconnectdb or PQexec to connect or execute a query but how does this work under windows? can i use the same API on windows systems? i'm sure there are many guys here who know how this stuff works, but since i work most time with linux i just have no idea on how to do database programming on windows any articles or hints would be great thx@ll

              M Offline
              M Offline
              markkuk
              wrote on last edited by
              #6

              Yes, the libpq API is available on Windows: http://www.postgresql.org/docs/8.1/static/install-win32.html[^]

              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