Delete schedule with attributes

2 posts / 0 new
Last post
MNN
Delete schedule with attributes

Hi,
I try to delete schedule and use API: /api/schedule/DeleteSchedule with parameter: {ScheduleIds: [6, 6], AttributeIds: [563, 1150]} and an error occurred. Please tell me what is my mistake?

An unhandled exception has occurred while executing the request.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Unknown SQL command.')
at Gurux.Service.Orm.GXDbConnection.Delete(GXDeleteArgs arg) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbConnection.cs:line 1846
at DBService.Controllers.ScheduleController.Post(DeleteSchedule request) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.DLMS.AMI\Gurux.DLMS.AMI\Controllers\ScheduleController.cs:line 187
at lambda_method(Closure , Object , Object[] )

Specified argument was out of the range of valid values. (Parameter 'Unknown SQL command.')
Unknown SQL command.

at Gurux.Service.Orm.GXDbHelpers.GetMembers(GXDBSettings settings, Expression expression, Char quoteSeparator, Boolean where, Boolean getValue) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbHelpers.cs:line 1361
at Gurux.Service.Orm.GXDbHelpers.GetMembers(GXDBSettings settings, Expression expression, Char quoteSeparator, Boolean where) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbHelpers.cs:line 762
at Gurux.Service.Orm.GXDbHelpers.GetMembers(GXDBSettings settings, Expression expression, Char quoteSeparator, Boolean where, Boolean getValue) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbHelpers.cs:line 1398
at Gurux.Service.Orm.GXDbHelpers.GetMembers(GXDBSettings settings, Expression expression, Char quoteSeparator, Boolean where) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbHelpers.cs:line 762
at Gurux.Service.Orm.GXDbHelpers.GetMembers(GXDBSettings settings, Expression expression, Char quoteSeparator, Boolean where, Boolean getValue) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbHelpers.cs:line 1253
at Gurux.Service.Orm.GXDbHelpers.GetMembers(GXDBSettings settings, Expression expression, Char quoteSeparator, Boolean where) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbHelpers.cs:line 762
at Gurux.Service.Orm.GXWhereCollection.Where(GXDBSettings Settings, LambdaExpression value, Boolean removebrackets) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXWhereCollection.cs:line 207
at Gurux.Service.Orm.GXWhereCollection.WhereToString(GXDBSettings settings, List`1 list) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXWhereCollection.cs:line 149
at Gurux.Service.Orm.GXWhereCollection.ToString() in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXWhereCollection.cs:line 67
at Gurux.Service.Orm.GXDeleteArgs.ToString() in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDeleteArgs.cs:line 83
at Gurux.Service.Orm.GXDbConnection.Delete(GXDeleteArgs arg) in D:\Repository\Cloud\branches\hes-dlms\Services\Gurux.Service\Development\DB\GXDbConnection.cs:line 1837

Kurumi
Kurumi's picture

Hi,

I can't see any reason why it fails. Get the latest version from the Gurux.DLMS.AMI.
SQL command are now logged if you change LogLevel at appsettings.json from "Warning" to "Information". Find GXSQL from the command line and you can see generated SQL. Example like this:

GXSQL: UPDATE GXSchedule SET "ExecutionTime" = '2020-07-22 08.57.00' WHERE "Id" = 168543

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi