J
jobs
I am able to access 9i and 10g Oracle DBs from other clients on my pc
- sqlplus, PLSQL Developer, etc.
As a simple test I just wanted to connect and access the same oracle
DBs through ASP.NET on my same client ...
my web config connection entry looks like this (somebody elsewhere
said this was working for them):
<add name="pp2" connectionString="user id=xxx;password=xxx;data
source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xxx.xxx)
(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=myservicenamet)))"/>
This asp.net code :
<asp:GridView ID="GridView1" runat="server" DataSourceID="pp2Source">
<Columns>
<asp:BoundField DataField="yyyy" HeaderText="" SortExpression="" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="pp2source" runat="server" ConnectionString="<%$
ConnectionStringsp2 %>"
selectcommand="select * from xxxx" >
</asp:SqlDataSource>
produces this error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
Just to make sure, I remove the block of code and the page works fine.
Note SQL Server messages, though trying to connect to Oracle. Also,
wondering if I need to identify a provider type??
I've double checked that the connection string, user and password
match what I test with from other clients and the tnsnames. I also
tried the entry without all the tns stuff.
Thank you for any help or information!
- sqlplus, PLSQL Developer, etc.
As a simple test I just wanted to connect and access the same oracle
DBs through ASP.NET on my same client ...
my web config connection entry looks like this (somebody elsewhere
said this was working for them):
<add name="pp2" connectionString="user id=xxx;password=xxx;data
source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xxx.xxx)
(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=myservicenamet)))"/>
This asp.net code :
<asp:GridView ID="GridView1" runat="server" DataSourceID="pp2Source">
<Columns>
<asp:BoundField DataField="yyyy" HeaderText="" SortExpression="" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="pp2source" runat="server" ConnectionString="<%$
ConnectionStringsp2 %>"
selectcommand="select * from xxxx" >
</asp:SqlDataSource>
produces this error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
Just to make sure, I remove the block of code and the page works fine.
Note SQL Server messages, though trying to connect to Oracle. Also,
wondering if I need to identify a provider type??
I've double checked that the connection string, user and password
match what I test with from other clients and the tnsnames. I also
tried the entry without all the tns stuff.
Thank you for any help or information!