Cannot remove this column, because it part of the primary key.

\\RG3.BO.Qu\\Repository\\DetailRepository.cs:line 156

{
    success: false,
    title: null,
    error: {
      httpTraceId: "0HMALCT30S805:00000004",
      httpMethod: "GET",
      httpStatusCode: 200,
      errorCode: 500,
      errorText:
        "Cannot remove this column, because it\\u0027s part of the primary key.",
      message:
        "Cannot remove this column, because it\\u0027s part of the primary key.",
      stack:
        "   at System.Data.DataColumnCollection.CanRemove(DataColumn column, Boolean fThrowException)\\r\\n   at System.Data.DataColumnCollection.BaseRemove(DataColumn column)\\r\\n   at System.Data.DataColumnCollection.Remove(DataColumn column)\\r\\n   at System.Data.DataColumnCollection.Remove(String name)\\r\\n   at RG3.BO.DB.Services.DbSqlService.SetConvertResponseData(PFGlobalParameter pfGlobal, BCDbConnection dbConnection, List\\u00601 dicResponseResult, Dictionary\\u00602 dicChilds, Dictionary\\u00602 dicSchemaDataAll, ResultObject\\u00601\\u0026 rm, SqlConfig sqlConfig, Dictionary\\u00602 dictionaryUrl, Dictionary\\u00602 dicSqlConfigChild, Dictionary\\u00602 dicDimData, RequestModuleType rmtRoot, ResponseMethod responseMethod, DataTable dtAll, Boolean isInit) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.DB\\\\Services\\\\DbSqlService$ResStartUp.cs:line 302\\r\\n   at RG3.BO.Qu.Repository.DetailRepository.Detail(PFGlobalParameter pf, String mkey, String resField, Dictionary\\u00602 dictionaryUrl, SqlConfig\\u0026 sqlConfig) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Qu\\\\Repository\\\\DetailRepository.cs:line 156\\r\\n   at RG3.BO.Qu.Services.DetailService.DetailJson(PFGlobalParameter pf, String mkey, String resField, Dictionary\\u00602 dictionaryUrl, SqlConfig\\u0026 sqlConfig) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Qu\\\\Services\\\\DetailService.cs:line 146\\r\\n   at RG3.BO.Qu.Services.DetailService.DetailUsed(String mkey, String resField, JToken jparams, HttpContext httpContext) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Qu\\\\Services\\\\DetailService.cs:line 301\\r\\n   at RG3.PF.Qu.Controller.DetailController.DetailPost(String mkey, String resField, JToken jparams) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Qu\\\\Controller\\\\DetailController.cs:line 135\\r\\n   at RG3.PF.Qu.Controller.DetailController.Detail(String mkey, String resField) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.BO.Qu\\\\Controller\\\\DetailController.cs:line 96\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\\u003CInvokeActionMethodAsync\\u003Eg__Logged|12_1(ControllerActionInvoker invoker)\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.\\u003CInvokeNextActionFilterAsync\\u003Eg__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State\\u0026 next, Scope\\u0026 scope, Object\\u0026 state, Boolean\\u0026 isCompleted)\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\\u003CInvokeFilterPipelineAsync\\u003Eg__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\\r\\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.\\u003CInvokeAsync\\u003Eg__Logged|17_1(ResourceInvoker invoker)\\r\\n   at Microsoft.AspNetCore.Routing.EndpointMiddleware.\\u003CInvoke\\u003Eg__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\\r\\n   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\\r\\n   at RG3.PF.Abstractions.Middlewares.GlobalExceptionMiddleware.Invoke(HttpContext context) in C:\\\\0_RG\\\\Code\\\\rg3-pf\\\\RG3.PF.Abstractions\\\\Middlewares\\\\GlobalExceptionMiddleware.cs:line 46",
      help: "{error.ErrorCode}",
    },
  }

确认 tableId 是否正确 “tableId”: 1


文档更新时间: 2021-10-16 12:37   作者:admin