Connection.LastInsertId now raises an error instead of crashing when the connection is closed.

[GB.DB]
* BUG: Connection.LastInsertId now raises an error instead of crashing when the connection is closed.
This commit is contained in:
gambas 2018-12-10 23:35:21 +01:00
parent 0706d6d170
commit 43350ebfbd

View file

@ -766,6 +766,8 @@ END_PROPERTY
BEGIN_PROPERTY(Connection_LastInsertId) BEGIN_PROPERTY(Connection_LastInsertId)
CHECK_DB(); CHECK_DB();
CHECK_OPEN();
GB.ReturnLong((*THIS->driver->GetLastInsertId)(&THIS->db)); GB.ReturnLong((*THIS->driver->GetLastInsertId)(&THIS->db));
END_PROPERTY END_PROPERTY