Question Oracle 10g XE connection to Visual Studio 2008

SystemCoder

New member
Joined
Sep 29, 2009
Messages
4
Programming Experience
Beginner
Hello All,

I am following an Oracle tutorial on how to create a .NET application. I will be using Visual Basic.
I have Oracle 10g XE and Visual Studio installed on my system. I have also installed ODAC to allow me to allow for connection. Visual Studio picks this up fine from the Add Connection option. It displays Oracle Database (Oracle ODP.NET).

I have been reading on another site on how to create a new data source name , so I can create the new connection. I have the instructions, but I need to amend a file called 'tnsnames.ora', which is a configuration file. I have performed a file search but cannot locate this file.
Can anyone help?

Thanks in advance,
SystemCoder
 
You can get this file under

Oraclehome/network/admin/.

Create a file with the name tnsnames.ora and add your entries. Then try connecting . U will succeed.
 
its easier to click start>>programs>>oracle odac home*>>configuration management tools*>>net manager

==tnsnames editor gui

* your mileage may vary
 
Connecting to Oracle XE from Visual Basic 2008 Server Explorer

Hello All,

I need your assistance on a technical matter. For my final year project I am trying to set up a database in Oracle XE and using Visual Basic 2008 as a front end. I have been following a tutorial online and have got to the following point.

I have been asked to set up the configuration file tnsnames.ora as follows:

################################################
oraclexe =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
################################################

Thats fine and I have done that. I am then asked to use the 'Change Data Source' wizard in Server Explorer. (This is of course in Visual Basic 2008)

ChangeDateSource.axd.png

Again this is fine. In the next screen I am asked to 'Add Connection' and the drop down 'Data source name:' should display oraclexe as follows:

AddConnection.axd.png

This is where I am getting stuck. Instead on my machine I am getting a blank drop down box as follows:

AddConnection2.jpg

I have tried the format for tnsnames.ora as above also the default as follows which was on my machine already in the file:
*Please not I have intentionally left HOST blank as it has my name in this field.


XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)


Can anyone familiar with this setup please help me? If you can you will be able to let me start my project.

Thankyou in advance,
SystemCoder
 
either:

the TNS listener service has not been started on your machine
oracle has not been started on your machine
you edited the wrong tnsnames.ora (if you installed server and client by mistake, you'll have 2 tnsnames)
your sqlnet.ora is missing some sensible defaults
 
Back
Top