Solved

VS 2008 -- ORACLE -- TNSNAMES Connection

Posted on 2009-07-13
3
575 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

828 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