|
-
Nov 27th, 2002, 01:10 AM
#1
Thread Starter
Hyperactive Member
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()
<%@ 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>
<ASP ataGrid 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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|