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 read Triggers of a Database

How to read Triggers of a Database

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelptutorial
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.
  • V Offline
    V Offline
    Vikrant for VC
    wrote on last edited by
    #1

    Hey Friends I wish to create a database viewer which can a) list down records of tables b) list down fields of tables c) list down triggers of tables. I am stuck when i am tryint to list down triggers of tables. I am aware of CRecordset & CDatabae classes

    V 1 Reply Last reply
    0
    • V Vikrant for VC

      Hey Friends I wish to create a database viewer which can a) list down records of tables b) list down fields of tables c) list down triggers of tables. I am stuck when i am tryint to list down triggers of tables. I am aware of CRecordset & CDatabae classes

      V Offline
      V Offline
      Vikrant for VC
      wrote on last edited by
      #2

      Hey Friends I got it SELECT * FROM user_objects WHERE object_type='TRIGGER' Now the problem is that how we can read the trigger details i found using Desc statment but how to run DESC using MFC ? Thanks :-)

      M 1 Reply Last reply
      0
      • V Vikrant for VC

        Hey Friends I got it SELECT * FROM user_objects WHERE object_type='TRIGGER' Now the problem is that how we can read the trigger details i found using Desc statment but how to run DESC using MFC ? Thanks :-)

        M Offline
        M Offline
        Milton Karimbekallil
        wrote on last edited by
        #3

        What u meant by DESC statement ? You can run this statement using ADODB. use _RecordsetPtr->Open to execute the sql. cheers...mil10.

        V 1 Reply Last reply
        0
        • M Milton Karimbekallil

          What u meant by DESC statement ? You can run this statement using ADODB. use _RecordsetPtr->Open to execute the sql. cheers...mil10.

          V Offline
          V Offline
          Vikrant for VC
          wrote on last edited by
          #4

          Hey Thanks buddy By saying DESC i meant the Trigger Details I found a query for the same which i can run using CRecordSet & get the value :-) SELECT Table_name , Trigger_Name , Trigger_type , description, TRIGGER_BODY FROM ALL_TRIGGERS Regards

          I 1 Reply Last reply
          0
          • V Vikrant for VC

            Hey Thanks buddy By saying DESC i meant the Trigger Details I found a query for the same which i can run using CRecordSet & get the value :-) SELECT Table_name , Trigger_Name , Trigger_type , description, TRIGGER_BODY FROM ALL_TRIGGERS Regards

            I Offline
            I Offline
            includeh10
            wrote on last edited by
            #5

            If you want to develop a database program, i suggest u use VB - it is very easy to learn and very powerful for databse issues. If you want to learn database in VC, i suggest u throw CRecordSet and all its related classes (i.e. CDatabase) away - they are very ugly. the best classes in VC are Cdatabase etc (d is lowercase) - they are very flexable and powerful, VB uses them at background. once u know Cdatabase etc, you are a master. u are a slave for forever if using CDatabase etc.


            A special image tool for Windows C++ programmers, don't miss it! The world unique Software Label Maker is waiting for you and me ... A nice hyper tool for optimizing your Microsoft html-help contents.

            C 1 Reply Last reply
            0
            • I includeh10

              If you want to develop a database program, i suggest u use VB - it is very easy to learn and very powerful for databse issues. If you want to learn database in VC, i suggest u throw CRecordSet and all its related classes (i.e. CDatabase) away - they are very ugly. the best classes in VC are Cdatabase etc (d is lowercase) - they are very flexable and powerful, VB uses them at background. once u know Cdatabase etc, you are a master. u are a slave for forever if using CDatabase etc.


              A special image tool for Windows C++ programmers, don't miss it! The world unique Software Label Maker is waiting for you and me ... A nice hyper tool for optimizing your Microsoft html-help contents.

              C Offline
              C Offline
              crazymubashir
              wrote on last edited by
              #6

              hi, Sorry for the intereption. My little experience in database suggest that you should not use the MFC Database classes if you want to develop a database. Instead use the "xxado.dll" to develop your app. In the stdafx.h file write these lines include include #import "path\\xxado.dll" namespace "EOF, adoEOF" Then use ur desired objects as follows: CoInitialze(NULL); IConnectionPtr pCon; IRecordsetPtr pRes; pCon.Open(connectionstring); pRecordset.open(query,pCon ,etc); ... CoUninitialize();

              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