[DB Cleaner on Steroids] Error in date/time conversion

Forge Component
(20)
Published on 19 May (6 days ago) by Miguel 'Kelter' Antunes
20 votes
Published on 19 May (6 days ago) by Miguel 'Kelter' Antunes

Hi Team,

I get an error using the automated cleanup, probably because of date/time conversion. What date/time constructions are supported?


-------------------------------------------------

eSpaceVer: Id=6012, PubId=0, CompiledWith=11.7.3.5968

Locale: en-US

DateFormat: dd-MM-yyyy

PID: ***** ('w3wp', Started='4/2/2020 12:51:02 PM')

Thread Name: .NET: 4.0.30319.42000

OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error executing query. ---> OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error in advanced query DeleteLogDetailTable in CycleDeleteLogTable in DBCleanerOnSteroids (EXEC sp_executesql @SQL;): Conversion failed when converting date and/or time from character string.

   --- End of inner exception stack trace ---

   at ssDBCleanerOnSteroids.Actions.FuncActionCycleDeleteLogTable.QueryDeleteLogDetailTable(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, String qpstSQL)

   at ssDBCleanerOnSteroids.Actions.ActionCycleDeleteLogTable(HeContext heContext, Int32 inParamLogTableTypeId, DateTime inParamMaxDateToKeep)

   at ssDBCleanerOnSteroids.Actions.ActionAutomatedCleanup(HeContext heContext)

   at ssDBCleanerOnSteroids.TimerAutomatedLogCleanup.Execute(HeContext heContext, Int32 timeout)

Sjoerd Twaalfhoven wrote:

Hi Team,

I get an error using the automated cleanup, probably because of date/time conversion. What date/time constructions are supported?


-------------------------------------------------

eSpaceVer: Id=6012, PubId=0, CompiledWith=11.7.3.5968

Locale: en-US

DateFormat: dd-MM-yyyy

PID: ***** ('w3wp', Started='4/2/2020 12:51:02 PM')

Thread Name: .NET: 4.0.30319.42000

OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error executing query. ---> OutSystems.HubEdition.RuntimePlatform.DataBaseException: Error in advanced query DeleteLogDetailTable in CycleDeleteLogTable in DBCleanerOnSteroids (EXEC sp_executesql @SQL;): Conversion failed when converting date and/or time from character string.

   --- End of inner exception stack trace ---

   at ssDBCleanerOnSteroids.Actions.FuncActionCycleDeleteLogTable.QueryDeleteLogDetailTable(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, String qpstSQL)

   at ssDBCleanerOnSteroids.Actions.ActionCycleDeleteLogTable(HeContext heContext, Int32 inParamLogTableTypeId, DateTime inParamMaxDateToKeep)

   at ssDBCleanerOnSteroids.Actions.ActionAutomatedCleanup(HeContext heContext)

   at ssDBCleanerOnSteroids.TimerAutomatedLogCleanup.Execute(HeContext heContext, Int32 timeout)


Try this one, never had any issues: https://www.outsystems.com/forge/component-overview/423/dbcleaner

Mart Potter wrote:

Try this one, never had any issues: https://www.outsystems.com/forge/component-overview/423/dbcleaner


Hi Mart,

Thank you for your reply. However, dbcleaner is missing capabilities I need.

Hi Sjoerd

Can you tell me what tables have you configured for automatically clean up? And the max days to keep values?

Hi Sjoerd

Version 1.0.3 is out and the Automated Cleanups were improved and there was a fix that it was related with your problem.

Please try this last version as it should fix your error.

Thanks