|
 |
asp_databases thread: How do I connect to the Oracle database on another server use of asp.net?
Message #1 by "Gan Yeok Sng" <ysgan@h...> on Mon, 23 Sep 2002 05:43:22
|
|
Oracle Server Name: oisprodb.world ip address: 172.18.4.2
Data Source Name: oisdatabase
Table name: oisdba_ois_ports
And What?s wrong to the code I amended below from the book code, the error
message:
ORA-01004: default username feature not supported; logon denied
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="vb" runat="server" Debug="true">
Sub Page_Load()
dim strConnection as string
= "Provider=MSDAORA.1;UserID=myidxxx;password=mypwxxx;"
strConnection += "Data source=oisprodb.world;"
dim strSQL as string = "Select Port_desc, Country_DE, Region_Des,
REGION from oisdba_ois_ports where region = '10';"
dim objConnection as new OLEDBConnection(strConnection)
dim objCommand as new OLEDBCommand(strSQL,objConnection)
objConnection.Open()
dgEmps.DataSource = objCommand.ExecuteReader
(CommandBehavior.CloseConnection)
dgEmps.DataBind()
end sub
</script>
Message #2 by Greg Griffiths <greg2@s...> on Mon, 23 Sep 2002 20:03:20 +0100
|
|
why not just use ODBC ?
Dim DSNName="myDB"
Dim UserName="scott"
Dim Password="tiger"
set dbConn = server.createobject("ADODB.connection")
dbConn.open DSNName, UserName, Password
At 05:43 23/09/02 +0000, you wrote:
>Oracle Server Name: oisprodb.world ip address: 172.18.4.2
>Data Source Name: oisdatabase
>Table name: oisdba_ois_ports
>
>
>And What's wrong to the code I amended below from the book code, the error
>message:
>ORA-01004: default username feature not supported; logon denied
>
>
><%@ Import Namespace="System.Data" %>
><%@ Import Namespace="System.Data.OleDb" %>
>
><script language="vb" runat="server" Debug="true">
> Sub Page_Load()
> dim strConnection as string
>= "Provider=MSDAORA.1;UserID=myidxxx;password=mypwxxx;"
> strConnection += "Data source=oisprodb.world;"
> dim strSQL as string = "Select Port_desc, Country_DE, Region_Des,
>REGION from oisdba_ois_ports where region = '10';"
>
> dim objConnection as new OLEDBConnection(strConnection)
> dim objCommand as new OLEDBCommand(strSQL,objConnection)
>
> objConnection.Open()
> dgEmps.DataSource = objCommand.ExecuteReader
>(CommandBehavior.CloseConnection)
> dgEmps.DataBind()
> end sub
></script>
Message #3 by "Drew, Ron" <RDrew@B...> on Mon, 23 Sep 2002 17:02:44 -0400
|
|
myDSN=3D"Provider=3DMSDAORA;User ID=3Duser;Password=3Dpassword;Data
Source=3Ddatabase_name;"
-----Original Message-----
From: Greg Griffiths [mailto:greg2@s...]
Sent: Monday, September 23, 2002 3:03 PM
To: ASP Databases
Subject: [asp_databases] Re: How do I connect to the Oracle database on
another server use of asp.net?
why not just use ODBC ?
Dim DSNName=3D"myDB"
Dim UserName=3D"scott"
Dim Password=3D"tiger"
set dbConn =3D server.createobject("ADODB.connection")
dbConn.open DSNName, UserName, Password
At 05:43 23/09/02 +0000, you wrote:
>Oracle Server Name: oisprodb.world ip address: 172.18.4.2
>Data Source Name: oisdatabase
>Table name: oisdba_ois_ports
>
>
>And What's wrong to the code I amended below from the book code, the
error
>message:
>ORA-01004: default username feature not supported; logon denied
>
>
><%@ Import Namespace=3D"System.Data" %>
><%@ Import Namespace=3D"System.Data.OleDb" %>
>
><script language=3D"vb" runat=3D"server" Debug=3D"true">
> Sub Page_Load()
> dim strConnection as string
>=3D "Provider=3DMSDAORA.1;UserID=3Dmyidxxx;password=3Dmypwxxx;"
> strConnection +=3D "Data source=3Doisprodb.world;"
> dim strSQL as string =3D "Select Port_desc, Country_DE,
Region_Des,
>REGION from oisdba_ois_ports where region =3D '10';"
>
> dim objConnection as new OLEDBConnection(strConnection)
> dim objCommand as new OLEDBCommand(strSQL,objConnection)
>
> objConnection.Open()
> dgEmps.DataSource =3D objCommand.ExecuteReader
>(CommandBehavior.CloseConnection)
> dgEmps.DataBind()
> end sub
></script>
Message #4 by "Schelling, Michael" <schellim@s...> on Tue, 24 Sep 2002 05:13:07 -0400
|
|
"This page contains sample ADO connection strings for ODBC DSN / DSN-Less,
OLE DB Providers, Remote Data Services (RDS), MS Remote, and MS DataShape.
Also included are ADO.NET connection strings for MySQL, ODBC, OLE DB,
Oracle, and SQL Server .NET Data Providers."
http://www.able-consulting.com/ado_conn.htm?f=ado_conn.htm
-----Original Message-----
From: Drew, Ron [mailto:RDrew@B...]
Sent: Monday, September 23, 2002 5:03 PM
To: ASP Databases
Subject: [asp_databases] Re: How do I connect to the Oracle database on
another server use of asp.net?
|
|
 |