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. how to use stored procedure

how to use stored procedure

Scheduled Pinned Locked Moved C / C++ / MFC
databasec++comsysadminhelp
6 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.
  • W Offline
    W Offline
    With_problem
    wrote on last edited by
    #1

    i am trying to use stored procedure to store data in my dtabse getting from remote server....but i dont know from where to start... i have done ole db connection to database with the help of ATL consumer wizard....now how to proced further...can anybody help me....

    R 1 Reply Last reply
    0
    • W With_problem

      i am trying to use stored procedure to store data in my dtabse getting from remote server....but i dont know from where to start... i have done ole db connection to database with the help of ATL consumer wizard....now how to proced further...can anybody help me....

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      You need to write the stored procedure in your database. Then test it from your app. Here[^] is an example. Googling will give you plenty of results to start with.


      Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

      W 1 Reply Last reply
      0
      • R Rajesh R Subramanian

        You need to write the stored procedure in your database. Then test it from your app. Here[^] is an example. Googling will give you plenty of results to start with.


        Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

        W Offline
        W Offline
        With_problem
        wrote on last edited by
        #3

        o yes stored procedure are wrriten in dtabase...now i am looking for how to use them on my project in vc++...should i need to use some classes or what....

        R 1 Reply Last reply
        0
        • W With_problem

          o yes stored procedure are wrriten in dtabase...now i am looking for how to use them on my project in vc++...should i need to use some classes or what....

          R Offline
          R Offline
          Rajesh R Subramanian
          wrote on last edited by
          #4

          You can use the CDatabase class to interact with databases using ODBC. If you are using DAO, then you can use CDaoDatabase class. PS: Are you looking for the ExecuteSQL keyword?


          Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

          W 1 Reply Last reply
          0
          • R Rajesh R Subramanian

            You can use the CDatabase class to interact with databases using ODBC. If you are using DAO, then you can use CDaoDatabase class. PS: Are you looking for the ExecuteSQL keyword?


            Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

            W Offline
            W Offline
            With_problem
            wrote on last edited by
            #5

            I am not using odbc but i am using OleDb connection for sql server....any idea

            R 1 Reply Last reply
            0
            • W With_problem

              I am not using odbc but i am using OleDb connection for sql server....any idea

              R Offline
              R Offline
              Rajesh R Subramanian
              wrote on last edited by
              #6

              No matter what methodology you adopt to connect to a database. SQL is going to remain the same. I assume you're able to connect to your database from your app. Have a look at this sample[^] which demonstrates how to call a stored procedure from c++. Also give a chance[^] to google.


              Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

              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