Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    4

    Unanswered: Triggers in windows application ^_^!!!

    hello

    I have created a windows application with visual c++ 6.0 which connects to a database.
    The application executes SQL queries and I want to set some triggers or the insert, update and delete queries.
    However, Where should i place my triggers?

    sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=s",sDrive r,sFile);
    TRY
    {
    CDatabase ComboDatabase;
    // Open the database
    ComboDatabase.Ope(NULL,false,false,sDsn);

    // Build the SQL statement
    SqlCommand = "INSERT INTO BandSetting "
    "VALUES('" + str25 + "'" ",'" + str1 + "'" ",'" + str2 + "'"
    ",'" + str3 + "'" ",'" + str4 + "'" ",'"+ str5 + "'" ",'"+ str6 + "'" ",'" + str7 + "'" ",'" + str8 + "'" ",'"+ str9 + "'" ",'" + str10 + "'" ",'" + str11 + "'" ",'"+ str12 + "'" ",'" + str13 + "'" ",'" + str14 + "'" ",'" + str15 + "'" ",'" + str16 + "'" ",'" + str17 + "'" ",'"+ str18 + "'" ",'" + str19 + "'" ",'" + str20 + "'" ",'"+ str21 + "'" ",'" + str22 + "'" ",'" + str23 + "'" ", + str24 + "'" ")" ;

    ComboDatabase.ExecuteSQL(SqlCommand);
    // Close the database
    ComboDatabase.Close();
    }

    where do i put the trigger???
    hope you guys can help me out on this! thanks (^_^!!)

  2. #2
    Join Date
    Jul 2001
    Location
    Germany
    Posts
    189

    Exclamation Trigger is a database object

    Hello,

    a trigger is a database object that is stored in the database.
    If you use Oracle, connect against the Oracle database and use the CREATE OR REPLACE TRIGGER command to insert a trigger to a table or a view.
    You can specify different types of triggers for example a trigger that only fires when inserts or update or deletes happens.
    You can even set triggers on special DDL events like logon logout, create tabla and so on.
    If you want to create trigger with a dialog based application, use AlligatorSQL and connect against your database. Click on your table in the schema and select the element trigger root. Press ALT-I to get into the dialog trigger and enter your options and your PL/SQL code to be executes when the rigger will be fired.

    AlligatorSQL http://www.alligatorsql.com/download/alligator.zip

    If you need further help, just send me an e-mail to m.peter@alligatorsql.com

    Hope this helps ?

    Best regards
    Manfred Peter
    Alligator Company Software GmbH
    http://www.alligatorsql.com

  3. #3
    Join Date
    Feb 2004
    Posts
    4

    Talking

    Wow..

    thanks for your reply...

    I'll try this out.
    Thanks very much!!!!!!!!!! =)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •