Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 19, 2009 10:09 PM by ibot
Aug 14, 2007 04:34 PM|LINK
Here is my code
Public Shared strConString As String = "data source=Oracle;user id=scott;password=tiger"
How do I excess the string to see if i am connected.
Aug 14, 2007 08:46 PM|LINK
See guide here: http://www.startvbdotnet.com/ado/oracle.aspx
Aug 15, 2007 03:01 PM|LINK
Can I also have the steps as far as starting the project or give me a link to accomplish this. I am new to ASP.Net and this is my first and only project
Aug 16, 2007 12:55 PM|LINK
Aug 17, 2007 04:07 PM|LINK
Step 1: Install Oracle10g Release 2 ODAC and Oracle Developer Tools for Visual Studio .NET
Step 2: Set Oracle_Home environment.
For example: Set Oracle_Home = C:\oracle\product\10.2.0\client_1
Step 3: Create sqlnet.ora and tnsnames.ora files under:
To setup connection, you can use tnsping to test it.
For example: tnsping your_oracle_service
Step 4: Add reference Oracle.DataAccess.dll
<%@ Page Language="VB" %>
<%@ Import Namespace="Oracle.DataAccess.Client" %>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim cn As OracleConnection = New OracleConnection()
Dim strconn As String
strconn = "Data Source = "
strconn &= "(DESCRIPTION = "
strconn &= " (ADDRESS_LIST ="
strconn &= " (ADDRESS = (PROTOCOL = TCP)(HOST = your_oracle_server)(PORT = 1521))"
strconn &= " )"
strconn &= " (CONNECT_DATA ="
strconn &= " (SERVICE_NAME = your_oracle_service)"
strconn &= " )"
strconn &= ");"
strconn &= "User Id=your_userid;"
strconn &= "password=your_password;"
'If you do set up tnsnames.ora , you can use the following code:
'strconn = "user id=your_userid;password=your_password;data source=your_oracle_server/your_oracle_service"
cn.ConnectionString = strconn
Aug 17, 2007 05:03 PM|LINK
TNS Ping Utility for 32-bit Windows: Version 18.104.22.168.0 - Production on 17-AUG-20
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = testoracle)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE
_NAME = prod) (SID = prod)))
OK (20 msec)
Oct 23, 2007 11:44 PM|LINK
We are struggling to connect to Oracle 10g from our ASP.NET 2.0. We have these installed on our dedicated server.
We're trying to figure out the Connection String so that the ASPX pages can read the Oracle database. Do we need to take all the steps that you listed? Do your steps pertain to the server or to the client?
With regards to your Connection String, we have never been able to figure out Data Source, Host, your_oracle_service or your_oracle_server for Oracle 10g. How do we do this? In Oracle Database Home Page, it does not give the Database Name. Is it "SYSTEM"?
Jan 14, 2008 03:38 PM|LINK
Its realy good. But how we know about the default database in oracle. Is it "ora"?
Jan 15, 2008 02:00 AM|LINK
I just installed the Oracle 10g Express Edition without customizing any paths or names on my Windows 2003 Server....
This Visual Basic code works for me on my asp.net web page:
<%@ Page Language="VB" Debug="True" %>
<%@ Import Namespace="System.Data" %>
@ Import Namespace="Oracle.DataAccess.Client"%>
@ Import Namespace="Oracle.DataAccess.Types" %>
Dim cn As New OracleConnection("Data Source=216.255.200.XX1/XE;User ID=myID;Password=myPW")
Jan 15, 2008 02:05 PM|LINK
This is the first time I've tried an Oracle connection and I completed all the above steps (but in C#) and still NO connection. I continue to receive the "Database error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
Can someone please help me back on track?