-1

I am using SqlHelper in my application. It's working properly if using SQL Server as the database. But it's not working in Oracle.

It shows:

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

How do I solve it?

4

2 に答える 2

0

SqlHelper は SQL Server 専用であるため、 Oracle Data Provider for .NETを使用する必要があります。私の知る限り、Microsoft は、組み込みの System.Data.OracleClient ではなく、Oracle の .NET データ プロバイダーを使用することを推奨しています。ここでのテストに基づくと、Oracle ドライバーは Microsoft の Oracle ドライバーよりもはるかに優れています。

于 2014-02-12T19:19:39.367 に答える
0

.NET で Oracle データベースに接続するには、System.Data.OracleClient ライブラリを使用する必要があります。SQL ヘルパーは、 SQL Serverで使用するために特別に設計されています。

于 2014-02-12T19:16:04.267 に答える