connecting to Oracle from ASP.NET 2.0 ?



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="<%$
ConnectionStrings:pp2 %>"

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!

.



Relevant Pages

  • Re: Connection delays causing problems.
    ... Over 150 clients running ACCELL applications. ... Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production ... The delay happens at connection time so no SQL query is involved. ... TNS Ping Utility for Linux: ...
    (comp.databases.oracle.server)
  • Re: Connection delays causing problems.
    ... This is true whether the connection is via sqlplus, ACCELL ... Over 150 clients running ACCELL applications. ... Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production ... The delay happens at connection time so no SQL query is involved. ...
    (comp.databases.oracle.server)
  • Re: ODBC Connect Failed SQLState 08001 SQL 2005
    ... The new SQLNativeClient interface is an OLE DB interface, not ODBC, but it should not matter. ... Have you bumped up the Connection Timeout keyword in the ConnectionString? ... Hitchhiker's Guide to Visual Studio and SQL Server ... seconds, however remote, T1 clients can take over 120 seconds to connect. ...
    (microsoft.public.sqlserver.connect)
  • Re: [DBNETLIB][ConnectionWrite(WrapperWrite()).]General network error. Check your network documentat
    ... Also it will much help if you do not expect an open connection to stay ... > Windows 2000 and Windows XP Pro Clients ... > CoreLabs dbExpress driver for SQL Server ...
    (microsoft.public.sqlserver.connect)
  • Re: Issue Select statement from SQL Server 2000 to obtain data fro
    ... So if I create another connection, could I then within SQL Server, issue ... Select commands against the Oracle tables? ... query in SQL Server which connects to Oracle using the same connection as I ...
    (microsoft.public.sqlserver.connect)