Active Query Builder support area

Exception while parsing SQL

Avatar
  • updated
  • Completed
Hello,

I am getting the following exception while the ActiveQueryBuilder is parsing this assigned SQL-statement:

System.OutOfMemoryException

The list box contains to many elements.

at System.Windows.Forms.ListBox.NativeAdd(Object item)
at System.Windows.Forms.ListBox.ObjectCollection.AddInternal(Object item)
at System.Windows.Forms.ListBox.ObjectCollection.Add(Object item)
at ActiveDatabaseSoftware.ActiveQueryBuilder.DataSourceControl.?(BaseSQLContext ?, MetadataList ?)
at ActiveDatabaseSoftware.ActiveQueryBuilder.DataSource.?(Object ?, EventArgs ?)
at ActiveDatabaseSoftware.ActiveQueryBuilder.BatchUpdatableBase.DoUpdated()
at ActiveDatabaseSoftware.ActiveQueryBuilder.BatchUpdatableBase.EndUpdate()
at ActiveDatabaseSoftware.ActiveQueryBuilder.UpdateRegion.Dispose()
at ActiveDatabaseSoftware.ActiveQueryBuilder.DataSourceQuery.ReloadFieldsFromUnderlyingSubquery()
at ActiveDatabaseSoftware.ActiveQueryBuilder.DataSourceQuery.?(Object ?, EventArgs ?)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at ActiveDatabaseSoftware.ActiveQueryBuilder.BatchUpdatableBase.DoUpdated()
at ActiveDatabaseSoftware.ActiveQueryBuilder.BatchUpdatableBase.EndUpdate()
at ActiveDatabaseSoftware.ActiveQueryBuilder.UpdateRegion.Dispose()
at ActiveDatabaseSoftware.ActiveQueryBuilder.SubSelectStatementProxy.?(Object ?, EventArgs ?)
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.ControlOwner.EndUpdate()
at ActiveDatabaseSoftware.ActiveQueryBuilder.QueryBuilder.EndUpdate()
at ActiveDatabaseSoftware.ActiveQueryBuilder.QueryBuilder.?()
at ActiveDatabaseSoftware.ActiveQueryBuilder.QueryBuilder.?(String ?)
at ActiveDatabaseSoftware.ActiveQueryBuilder.QueryBuilder.set_SQL(String value)


The assigned SQL statement is:

SELECT DISTINCT ma.ID, ma.surname, ma.forename, ma.username AS benutzername,
ma.surname || ', ' || ma.forename AS NAME
FROM (SELECT TO_CHAR (az.beginn, 'DD.MM.YYYY'),
SUM (az.ende - az.beginn) diff,
az.pia3_mitarbeiter_id, az.love_typ
FROM hora3_arbeitszeit az
WHERE az.love_typ IN (-102, -106)
AND az.beginn >= :beginn
AND az.beginn < :ende
GROUP BY TO_CHAR (az.beginn, 'DD.MM.YYYY'),
az.pia3_mitarbeiter_id,
az.love_typ) tab1
INNER JOIN
vw_pia3_aktive_mitarbeiter ma ON ma.ID =
tab1.pia3_mitarbeiter_id
WHERE ma.ID IN (:mitarbeiter) AND tab1.diff >= 4 / 24
ORDER BY ma.surname, ma.forename


Of course I cannot provide you the database, but I hope you can find the bug without it. I am using an Oracle Database.

Kind regards
Christian Sack
Avatar
pdv-software
Short addition: I am using version 2.9.6.716
Avatar
Hi Christian,
Thank you for reporting the issue.
The fixed version is available for download.
Avatar
pdv-software
OK, thank you. Can you maybe tell me the reason/circumstances of this error? We recently had a rollout of our software which uses AQB and now I am trying to evaluate if we need a hotfix and I need the severity of this error/bug.
Avatar
The derived query in your SQL statement has the expression without alias. There was a bug in displaying such columns.