Solved

VS 2008 -- ORACLE -- TNSNAMES Connection

Posted on 2009-07-13
3
572 Views
Last Modified: 2013-12-19
I created the below VS 2008 .net 3.5 Windows (non-web) Oracle APP, installed the .EXE on my machine accessing the remote DB and it worked.  I then upgraded my coworker's machine to .net 3.5, rebooted, installed the OracleClient, configured the TNSNAMES file to be the same as my file, installed the APP, and get the following error when running the app:

ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

What else do I need to install or fix ?
---------------------------------------------------
Setup
 1. drop FMFORMULA gridView onto form
 2. drag FMENTITY gridView next to FMFORMULA
    gridView & delete FMENTITY gridView
     ** gets FMENTITY BindingSource
        and TableAdapter onto page
 3. edit FMFORMULA gridView COLUMNS
     ** FMENTITYID column
          a. READONLY = True
          b. ColumnType = ComboBox
          c. DataSource = fMENTITYBindingSource
          d. DisplayMember = FMENTITYNAME
          e. ValueMember = FMENTITYOBJECTID
          f. HeaderText = ENTITY
          g. DisplayStyle = Nothing
     ** FMCODE column
          a. READONLY = True
     ** FMVERSION column
          a. READONLY = keep "False"
     ** other columns
          a. Delete
 4. create gridView "DataError" EVENT
    messagebox ("Please enter numbers")
 5. add "order by FMCODE, FMENTITYID, FMVERSION"
    to DataSet1.xsd FMFORMULATableAdapter "FILL"
Adding Search
 6. rightClick DataSet1.xsd FMFORMULATableAdapter
      ** Add, Query, Select
      ** WHERE FMCODE = :FMCODE
           ** don't use "WHERE FMCODE = @FMCODE" like MSSQL uses
      ** add "order by FMCODE, FMENTITYID, FMVERSION"
         to DataSet1.xsd FMFORMULATableAdapter if needed
      ** Fill METHOD NAME = FillBy
      ** Return METHOD NAME = GetDataBy
 7. add below CONTROLS to existing Form1.cs "ToolStrip"
     ** Sepeartor
     ** Label
          a. TEXT = Search By Formula
     ** Textbox
          a. NAME = txt_FormulaCode
     ** Button
          a. DisplayStyle = Text
          b. Text = SUBMIT
          c. Click EVENT = toolStripButton1_Click
               ** this.fMFORMULATableAdapter.FillBy(this.dataSet1.FMFORMULA,this.txt_FormulaCode.Text);
     ** Button
          a. DisplayStyle = Text
          b. Text = CLEAR
          c. Click EVENT = toolStripButton2_Click
               ** this.fMFORMULATableAdapter.Fill(this.dataSet1.FMFORMULA);
 8. test by doing above "Summary" section, WORKS
0
Comment
Question by:finance_teacher
3 Comments
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24844378
From his machine, try tnsping <SERVICE NAME>

Your listener must be reachable from his PC.

Is there a firewall?
0
 

Author Comment

by:finance_teacher
ID: 24848927
Steps I did
 1. made sure .net 3.5 was working
 2. made sure "tnsping DB..." worked

What other things should I check ?
0
 
LVL 11

Accepted Solution

by:
it-rex earned 500 total points
ID: 24881451
we have hit this before looks like your VS config file is using a differnt service name than the one your are using ;
with tnsping you can use a ny valid service name you have chosen but with MS apps you need to make sure it is the smae like your config file.


0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now