diff --git a/main/lib/db/CConnection.c b/main/lib/db/CConnection.c index f339d704d..544d844a8 100644 --- a/main/lib/db/CConnection.c +++ b/main/lib/db/CConnection.c @@ -766,6 +766,8 @@ END_PROPERTY BEGIN_PROPERTY(Connection_LastInsertId) CHECK_DB(); + CHECK_OPEN(); + GB.ReturnLong((*THIS->driver->GetLastInsertId)(&THIS->db)); END_PROPERTY