David Osborne · Mar 19, 2019

Entity Framework Provider issue when "Support Delimited Identifiers" is turned off

I'm attempting to use the .NET Entity Framework provider that is provided by InterSystems (see:  In our environment, the "Support Delimited Identifiers" option is turned off and we are not allowed to turn it on without significant testing effort.  When this setting is off, the SQL that is generated by the Entity Framework provider is not considered valid and therefore the provider doesn't work (it DOES work, however, when this setting is turned ON).

Do you know of any way to work around this issue? Again, we don't have the option of turning the "Support Delimited Identifiers" option ON unfortunately.

0 0 3 226
Log in or sign up to continue


can you please provide provide SQL generated by the Entity Framework that is not valid and error that is generated.

Here's the SQL:

"Extent1"."NAME" AS "NAME", 
"Extent1"."DATA_TYPE" AS "DATA_TYPE", 

And here's the stack trace:

System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> InterSystems.Data.CacheClient.CacheException: [SQLCODE: <-1>:<Invalid SQL statement>]
[Location: <Prepare>]
[%msg: < IDENTIFIER expected, : found^SELECT :%qpar(1) . :%qpar(2) AS :%qpar(3) , :%qpar(4) . :%qpar(5) AS :%qpar(6) , :%qpar(7) . :%qpar(8) AS :%qpar(9) , :%qpar(10) . :%qpar(11) AS :%qpar(12) , :%qpar(13) . :%qpar(14) AS :%qpar(15) , :%qpar(16) . :%qpar(17) AS :%qpar(18) , :%qpar(19) . :%qpar(20) AS :%qpar(21) , :%qpar(22) . :%qpar(23) AS :%qpar(24) , :%qpar(25) . :%qpar(26) AS :%qpar(27) , :%qpar(28) . :%qpar(29) AS :%qpar(30) , :%qpar(31) . :%qpar(32) AS :%qpar(33) , :%qpar(34) . :%qpar(35) AS :%qpar(36) , :%qpar(37) . :%qpar(38) AS :%qpar(39) FROM :%qpar>]
    at InterSystems.Data.CacheClient.CacheADOConnection.GetServerError(Int32 rc)
   at InterSystems.Data.CacheClient.CacheADOConnection.processError(Int32 error, Int32 allowError)
   at InterSystems.Data.CacheClient.InStream.readHeader(CacheCommand stmt, Int32 stmt_id, Int32 type, Int32 allowError, Boolean requestData)
   at InterSystems.Data.CacheClient.InStream.readHeader(CacheCommand stmt, Int32 type, Int32 allowError)
   at InterSystems.Data.CacheClient.CacheCommand.sendDirectQueryRequest()
   at InterSystems.Data.CacheClient.CacheCommand.Execute()
   at InterSystems.Data.CacheClient.CacheCommand.ExecuteReaderObject(CommandBehavior behavior, String method)
   at InterSystems.Data.CacheClient.CacheCommand.ExecuteReader(CommandBehavior behavior)
   at InterSystems.Data.CacheClient.CacheCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext`1 c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
--- End of inner exception stack trace ---
    at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__6()
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
   at InterSystems.Data.Entity.DefaultCacheExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()

This SQL works when "Support Delimited Identifiers" is turned ON but in our environment this setting is turned OFF and we're not allowed to turn it on without significant testing effort that is cost prohibitive.  Is there a way we can configure the Entity Framework provider to work around this?


I am trying to use Entity Framework for Intersystems Cache from Visual Studio 2019, but i couldn't see the Cache Data Source. I got only the below items. Are you able to see Cache Data source? If yes, could you please share the details how to bring this

I followed all the steps mentioned in "Database First Section" from the URL