True, but the information available is very limited, basically just the NEW 
database row and function calls.

CREATE TRIGGER return_pono AFTER INSERT ON po BEGIN
    INSERT INTO inserts VALUES 
(datetime('now'),'po','return_pono',last_insert_rowid());
END

Unless of course you start writing user defined functions that access the 
internal structures of SQLite, which seems quite beyond the current capability 
of the OP.

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Jean-Luc Hainaut
Gesendet: Donnerstag, 20. September 2018 10:40
An: sqlite-users@mailinglists.sqlite.org
Betreff: Re: [sqlite] [EXTERNAL] Last_row_id

On 17/09/2018 14:05, Hick Gunter wrote:
> A trigger program does not return any result rows.

True. But a "select" query in the body of a trigger can be used to evaluate a 
user-defined function (in the "where" clause for instance) in which any action 
allowed by your host language can be executed, including writing in a text file 
or opening a DB connection.

> -----Ursprüngliche Nachricht-----
> Von: sqlite-users
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von
> Yadwindersingh
> Gesendet: Sonntag, 16. September 2018 03:28
> An: sqlite-users@mailinglists.sqlite.org
> Betreff: [EXTERNAL] [sqlite] Last_row_id
>
> Hi all;
> I am using vs15.x
>
> Create trigger return_pono after insert on po Begin Select
> last_insert_rowid();
>
> End
>
> Trigger works quite fine in sqlite but fails to return any value to
> vb.net statement
>
> Dim lrow as int64
>
> Lrow = some_cmd.executescalar()
>
>
> Please help
> Thank you
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___________________________________________
>   Gunter Hick | Software Engineer | Scientific Games International
> GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR:
> 0430013 | (O) +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to