cancel
Showing results for 
Search instead for 
Did you mean: 

How to know when an Ultralite's table has its data modified?

Former Member
4,013

Hello experts,

I want to fire some notifications to my UI whenever a specific table has its data modified, by a DML script execution, for example.

I know that I can listen to this type of notification when the table is modified by the synchronism process (using Observers), but I couldn't find anything like that for DML executions.

I've been using the UltraliteJ for Android, 12.0.1 (3605).

Is there any way to do that?

Best Regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

FYI

UltraLiteJ for Android now supports system events for: (1) Table modifications, (2) Commits, (3) Synchronization completion.

This will first appear in 12.0.1.3792.

Former Member
0 Kudos

Thank you so much, Andy. This is going to be awesome and very useful!

Former Member
0 Kudos

How do I use the functionality that was added in 12.0.1.3792? I'm particularly interested in detecting table modifications.

Answers (2)

Answers (2)

Former Member

Alex,

This is the second recent request for this functionality for UltraLiteJ for Android. We do not currently expose the UltraLiteC table modification event in the Android library. We will add this to our list of features to support for Android. I cannot commit to a time frame, but the more customers that ask for it, the higher its priority will be.

Thanks you for the feedback.

Former Member

Hi,

I'm looking forward for this functionality. Please release it as soon as possible.

tks

Former Member

Andy, DML notifications will help my application too! Thank you!

Former Member

Me too! Thanks!

Former Member

The UltraLiteJ Android event mechanism is based on the C++ UltraLite feature:

    // Main Thread
    Connection conn;
    ...
    conn.registerForEvent( ULjEvent.TABLE_MODIFIED_EVENT, "TableA" );
    ...
    conn.unregisterForEvent( ULjEvent.TABLE_MODIFIED_EVENT, "TableA" );
    conn.cancelWaitForEvent();

// Event Handler Thread
    ULjEvent event;
    for(;;) {
        try {
            event = conn.waitForEvent( -1 );
            if( event == null ) break;
            // handle event
            if (event.getType() == ULjEvent.TABLE_MODIFIED_EVENT) {
                String table_name = event.getParameter( "table_name" );
            }
        }
        catch (ULjException e) {
        }
    }