web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a problem I can't see a solution to.

On a CRM 2015 SP 0.1 On-Premise, I have a problem when saving an Opportunity with the Account having a value (parentaccountid).

On some records the Generic SQL error are thrown, but not all. Cannot find the reason for some saving just fine and others do not.

The trace file reveals the following:

 

Type: System.Data.SqlClient.SqlException

Message (88): Invalid column name 'Level'.

I have no Plugins or Workflows, so they are not to blame.

Any suggestions :-)

Best,

Christian

 

*This post is locked for comments

I have the same question (0)
  • ISMAIL TUTUMLUER Profile Picture
    399 on at
    RE: Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

    Edit p_CascadeReparent procedure, you have to change "level" keyword to [level], have to use brackets in the procedure. Because word of "level" is a Transact-SQL reserved keyword. I think it'a bug.

  • Community Member Profile Picture
    on at
    RE: Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

    We are seeing the same issue but get the following in the log file:

    ClientConnectionId:847d677c-e7f9-48f9-ac8b-76b84c84258f
    Error Number:207,State:1,Class:16
    [2015-08-25 15:49:30.627] Process: w3wp |Organization:394017ba-646a-4fbb-8b82-304746924281 |Thread: 390 |Category: Exception |User: 124719f8-a9b1-4695-aeb6-5818d73103fb |Level: Error |ReqId: e75feed1-50fb-401a-9c88-c3ef6a0204dc | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x5
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xF7
    at RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) ilOffset = 0x1E7
    at Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) ilOffset = 0xBB
    at Activator.CreateInstance(Type type, Object[] args) ilOffset = 0x39
    at VersionedPluginProxyStepBase.WrapExceptionToThrow(CrmException exception) ilOffset = 0xA5
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action) ilOffset = 0x2D
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0xD8
    at <>c__DisplayClass1.<RunStage>b__0() ilOffset = 0x0
    at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action) ilOffset = 0x2D
    at MessageProcessor.RunStage(PipelineExecutionContext context, Int32 pipelineStage) ilOffset = 0x39
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x171
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1EE
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at UpdateCommand.Execute() ilOffset = 0x7
    at DataSource.Update(EntityProxy entity, Boolean performDuplicateCheck, Guid auditingTransactionId, IOrganizationContext context) ilOffset = 0x11
    at EntityProxy.Update(Boolean performDuplicateCheck, Guid auditingTransactionId) ilOffset = 0x0
    at EntityProxy.Update(Boolean performDuplicateCheck) ilOffset = 0x7
    at EntityProxy.UpdateAndRetrieve(String[] columnSet, Boolean performDuplicateCheck) ilOffset = 0x0
    at CommandBase.UpdateEntity(Entity entity, Boolean retrieve) ilOffset = 0xD1
    at SaveCommand.ExecuteCommand(String commandXml) ilOffset = 0x116
    at CommandBase.Execute(String commandXml) ilOffset = 0x13
    at InlineEditWebService.Execute(Int32 command, String commandXml) ilOffset = 0xD0
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xCF
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: Microsoft.Crm.CrmException: Generic SQL error. ---> System.Data.SqlClient.SqlException: Invalid column name 'Level'.
    Invalid column name 'Level'.
    Invalid column name 'Level'.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

    Hi Rajkumar,

    thank you for pointing me in that direction. I have just updated the Relation opportunity_customer_account and set the Reparent = None.

    And it solved the problem!!!

    But this seems like a bug? But for now is an ok workaround :-)

  • Verified answer
    Rajkumar Rajaraman Profile Picture
    on at
    RE: Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

    You can walkthrough the following blog for reparent cascading permission:

    crmtipoftheday.com/.../what-does-reparent-mean

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Community Member Profile Picture
    on at
    RE: Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

    Hi Scott,

    The snippet from above is also from the trace file. But I have posted at bigger chunk here:

    [View:http://pastebin.com/HdXF3qAG:550:50]

    I can see the Exception is raised by a Stored Procedure after this call:

    exec p_CascadeReparent '94a64d78-2235-e511-80e5-005056806aea', 3, 'a55e56ce-cd14-e511-80e5-005056806aea', 8

    And the p_CascadeReparent has this in the documentation:

    -- the algorithm proceeds level by level, using level data stored in the #CascadeCollectReparent table.

    But beside that I cannot identify my next action

     

     

     

     

  • ScottDurow Profile Picture
    21 on at
    RE: Generic SQL Error in 2015 SP 0.1 - Invalid column name 'Level'

    Can you run a CRM trace crmdiagtool2011.codeplex.com

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans