每当我尝试运行此查询时,都会收到以下错误:
var query = from u in StageEntity.STAGINGINTERACTIONPOINTS
where u.OBJECTID == OBJECT_ID
select u;
"Schema specified is not valid. Errors: \r\nStagingDB.ssdl(2,2) : error 0152:
No Entity Framework provider found for the ADO.NET provider
with invariant name 'Oracle.ManagedDataAccess.Client'.
Make sure the provider is registered in the 'entityFramework'
section of the application config file.
See http://go.microsoft.com/fwlink/?LinkId=260882 for more information."
Run Code Online (Sandbox Code Playgroud)
但是,我认为的问题是我无法在运行时访问配置文件。这是因为我的应用程序是 ArcObjects 扩展并且由于某种原因忽略了所有不是 Config.esriaddinx 的配置文件。因此在运行时,我从配置文件中获取连接字符串。
这适用于 SQL 服务器,但我之前没有在 Oracle 中尝试过。我想知道是否需要在运行时包含和声明某些内容才能使 Oracle ODP 正常工作。
这是我拉取并调用的连接字符串:
connection string="DATA SOURCE=(DESCRIPTION=(ADDRESS= (PROTOCOL=TCP) (HOST=examplehost.com)(PORT=1234))(CONNECT_DATA=(SID = sid)));PASSWORD=hunter2;PERSIST SECURITY INFO=True;USER …Run Code Online (Sandbox Code Playgroud)