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. MFC

MFC

Scheduled Pinned Locked Moved C / C++ / MFC
c++databaseoracle
2 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.
  • P Offline
    P Offline
    parthmankad
    wrote on last edited by
    #1

    i have a dialog box where i am having a combo-box control and two edit controls.i want to insert the value of the combo box which i select and also of the two d\edit controls into a table in oracle database when i click the ok button.i want to use the CDatabase.ExecuteSqlQuery command.how should i write the insert statement.

    D 1 Reply Last reply
    0
    • P parthmankad

      i have a dialog box where i am having a combo-box control and two edit controls.i want to insert the value of the combo box which i select and also of the two d\edit controls into a table in oracle database when i click the ok button.i want to use the CDatabase.ExecuteSqlQuery command.how should i write the insert statement.

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

      m_combo.GetWindowText(strComboText);
      m_edit1.GetWindowText(strEdit1Text);
      m_edit2.GetWindowText(strEdit2Text);

      // you'll need to supply the name of your table, and the columns that are being updated
      strSQLQuery.Format("INSERT INTO (column list) VALUES ('%s', '%s', '%s')",
      strComboText, strEdit1Text, strEdit2Text);

      CDatabast.ExecuteSqlQuery(strSQLQuery);


      A rich person is not the one who has the most, but the one that needs the least.

      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