Results 1 to 3 of 3

Thread: **not resolved **Ora-12154,tns Names Could Not Resolve Service Name

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2002
    Location
    india
    Posts
    418

    **not resolved **Ora-12154,tns Names Could Not Resolve Service Name

    hi,
    can any one help me to overcome this error.this error occur at myconnection.open() .i already included oracle connection in tnsnames.ora.but i couldnot get it.in vb6 it is not giving any error with the same dsn name.

    <%@ Page %>
    <%@ import Namespace="System.Data" %>
    <%@ import Namespace="System.Data.OleDb" %>

    <script runat="server">
    public class test
    inherits System.Web.UI.Control
    Sub Page_Load(Src As Object, E As EventArgs)
    Dim myConnString As String = _
    "Provider=MSDAORA;Data Source=aspnet;User ID=poms;Password=pomsabc99;"

    Dim myConnection As New OleDbConnection(myConnString)
    myConnection.Open()
    Dim myCommand as new OleDbCommand("select * from t_country_master",myConnection)
    dim myReader as OledbDataReader
    myReader=myCommand.ExecuteReader()
    while myReader.read()
    response.write(myReader("country"))
    end while
    myConnection.Close()
    End Sub
    end class
    </script>
    <html>
    <head>
    </head>
    <body>
    <ASPataGrid id="MyDataGrid" runat="server"
    Width="700"
    BackColor="#ccccff"
    BorderColor="black"
    ShowFooter="false"
    CellPadding=3
    CellSpacing="0"
    Font-Name="Verdana"
    Font-Size="8pt"
    HeaderStyle-BackColor="#aaaadd"
    EnableViewState="false"
    />
    </body>
    </html>

  2. #2
    New Member
    Join Date
    Jan 2002
    Location
    Bandung - Indonesia
    Posts
    14

    Check your Oracle database

    - Makes sure that you've already had Oracle Client installed on your machine.
    - Try to ping your Oracle database server, ex : ping aspnet
    - If the connection is failed, fix it by changing your IP/Subnet address. The database subnet must be the same with your machine.
    - Use Net8 Assistant (Oracle 8i) as a tool for editing your tnsnames.ora, it will be safer and more comfortable .
    - If Net8 track is OK, than your ADO track should be OK too.
    K I
    is in the house

    Mail me
    ==========================
    "Finally VB is getting closer to Java haha"

  3. #3
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    it looks like a oracle server error maybe the listner is down or some network problem is causing that error.
    "All those who wonder are not lost" -j.r.r tolkien

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width