PC Review


Reply
Thread Tools Rate Thread

connecting to Oracle from ASP.NET 2.0 ?

 
 
jobs
Guest
Posts: n/a
 
      7th Jun 2007
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!

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      7th Jun 2007
On Jun 7, 10:26 pm, jobs <j...@webdos.com> wrote:
> 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!


I think connection string is wrong.

Anyhow, please check this article at first
http://msdn2.microsoft.com/en-us/library/92ceczx1.aspx

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems connecting to Oracle 9i database with Oracle 10g Client and Win XP x64 Sacha Korell Microsoft ADO .NET 2 17th Oct 2006 11:05 PM
.net Connecting to Oracle Ian Walsh Microsoft ADO .NET 2 15th Oct 2004 07:19 PM
error while connecting to oracle from Microsoft .net data provider for oracle Reny J Joseph Thuthikattu Microsoft VB .NET 8 16th Aug 2004 12:48 PM
Re: error while connecting to Oracle using Microsoft .NEt oracle client Bob Clegg Microsoft VB .NET 0 1st Apr 2004 11:18 AM
Problems connecting to Oracle using Oracle Provider for .Net Framwork RDF Microsoft ADO .NET 1 13th Aug 2003 10:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:50 PM.