Problem with trigger

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Problem with trigger

Postby sabrine » Mon Aug 17, 2009 5:21 pm


In a java code, I create a trigger which acts after insert in a table named contact.
This is the code:
private static final String DB_CREATE_TICONTACT =
"CREATE TRIGGER ti_contact after INSERT ON contact " +
"begin" +
" INSERT INTO tracestable VALUES ( 'contact','insert', new._idcontact, datetime());" +
" end; ";

public void addticontact(){mDb.execSQL(DB_CREATE_TICONTACT);}

The trigger is created, but when I try to insert a new values in the contact table I couldn’t, however if the trigger is deleted (or before creating it) I could!!

Could someone help me?

Thank you in advance.
Posts: 2
Joined: Wed Jul 08, 2009 12:52 pm


Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests