In GWindows.Databases, the procedure and function named
Execute have a local variable Records declared as
Records : aliased GNATCOM.Types.VARIANT;
It is passed to ADO.uConnection_Interface.Execute as an
unchecked address:
Result := Execute (Database.Connection,
To_BSTR_From_GSTRING (Query),
Records'Unchecked_Access, 0);
This results in an immediate Bad Variable Type COM
exception. This is because Records is not initialized.
The fix is to insert
GNATCOM.VARIANT.Initialize(Records);
immediately before the call to Execute.
A unified-format diff containing the patch is attached.
patch for gwindows-databases.adb