Visual Web Developer 2010 Express - 访问远程数据库的限制?

发布于 2024-11-13 23:04:31 字数 507 浏览 6 评论 0原文

我在笔记本电脑上使用 Visual Web Developer 2010 Express 来运行一些 ASP.Net,它试图访问另一台计算机上的 Oracle 数据库。

我在执行时遇到一些困难......

SqlConnection myConnectionTest = new SqlConnection(s);

在我进一步进行之前,我想我应该检查......VWD2010是否对访问远程数据库施加了某种限制?

[不确定这是否与 oracle 的 connectionStrings 条目相关,使用的是无 TNS 连接字符串,如下所示:

<add name="ABC" connectionString="providerName="OraOLEDB.Oracle";Data Source=//foo.bar.com:1521/dev10.foo.bar.com;User Id=auserid;Password=apwd;"/>

I'm using Visual Web Developer 2010 Express on my laptop to run some ASP.Net which is trying to access an Oracle database on another machine.

I've having some difficulties executing ...

SqlConnection myConnectionTest = new SqlConnection(s);

... and before I went any further I thought I should check .... does VWD2010 impose some sort of limitations on accessing remote databases ?

[Not sure if this is relevant the connectionStrings entry to oracle is using a TNS-less connection string like this :

<add name="ABC" connectionString="providerName="OraOLEDB.Oracle";Data Source=//foo.bar.com:1521/dev10.foo.bar.com;User Id=auserid;Password=apwd;"/>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

○闲身 2024-11-20 23:04:31

没有任何限制会阻止访问 Oracle 数据库

Visual Studio 2008 Express Edition 中“缺少”什么?

这可能有一定的价值:

有关 Oracle 连接字符串的提示

There are no limitations that would prevent access to an Oracle Database

What is "missing" in the Visual Studio 2008 Express Editions?

This may be of some value:

Tips on Oracle Connection Strings

请爱~陌生人 2024-11-20 23:04:31

Mitch Wheat

关于连接字符串的提供者方面的有趣观点。如果我不将其放入字符串中,以便连接字符串看起来像这样……

<add name="ABC" providerName="OraOLEDB.Oracle" connectionString="Data Source=//foo.bar.com:1521/dev10.foo.bar.com;User Id=auserid;Password=apwd;"/>

那么我会收到一条错误,表明 VWDC 正在尝试连接到 SQL Server 数据库!

Ex.Message = A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

...它似乎默认使用 SQL Server,这让我最初想知道 VWDC 中是否存在某些限制。

对此有什么意见欢迎留言!

Mitch Wheat

Interesting point about the provider aspect of the connection string. If I don't put it into the string so that the connection string looks like this ...

<add name="ABC" providerName="OraOLEDB.Oracle" connectionString="Data Source=//foo.bar.com:1521/dev10.foo.bar.com;User Id=auserid;Password=apwd;"/>

... then I get an error which suggests that VWDC is trying to connect to a SQL Server database !

Ex.Message = A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid)

... the way that it seems to be defaulting to SQL Server which was what made me wonder initially whether there was some lim itation within VWDC.

Any comments on this welcome !

韵柒 2024-11-20 23:04:31

根据connectionstrings.com,无 TSN 连接字符串的形式为:

Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=myPort)))(CONNECT_DATA=(SID=MyOracleSID)(SERVER=DEDICATED)));User Id=myUsername;Password=myPassword;

providerName”也被接受吗?

According to connectionstrings.com, a TSN-less connection string has the form:

Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=myPort)))(CONNECT_DATA=(SID=MyOracleSID)(SERVER=DEDICATED)));User Id=myUsername;Password=myPassword;

Is 'providerName' also accepted?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文