SQLite Forum

Need help building a custom amalgamation
Login
> The remote machine already runs sqlite

In what form? There are at least three things that phrase could mean:

1. It's embedded into some other application, which means your app must carry a second copy, presumably also embedded.

2. Special case of #1, it's embedded into a copy of the SQLite shell, `sqlite3`, and the existing users are making calls through the shell to get anything done. Yet, if this is the case, then I don't see why you'd be talking about writing your own C program at all. You'd be using the same shell-based mechanisms.

3. It's a shared library, so both your program and this other one can share it, which then calls into question why you're worried about space at all. It's paid for already.

If you have two C programs both needing SQLite and space is at a premium, you should be trying for #3.

> I just want my C program to be able to CREATE TRIGGER.

Why, exactly?

A trigger without `INSERT`, `DELETE` or `UPDATE` statements is useless.

I assume this other program is modifying the DB, and you're trying to react to that, but that then calls into question what you're trying to do when the DB gets modified.

I ask because if we take your quoted post literally, then you don't need to write a custom C program at all. You could upload a copy of `sqlite3` built for the remote target, create the trigger by typing it into the shell, and then you're done, right? I assume that *isn't* right; thus the probing questions.