Re: Problem connecting to Oracle database using ASP

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Tue, 10 Jun 2003 08:51:23 -0500
Message-ID: <caobev8i9o68s7ccnnv0h16dr0qdg7dn6j_at_4ax.com>


IIRC, Unless you have a names.default_domain specified as 'Universe.com' in your SqlNet.ora file, you need to use Data Source=oracle.Universe.com

hth

androidsun_at_yahoo.com (js) wrote:

>Thanks for the reply. The following is my TNSNAMES.ORA file, I tried
>all and none got connection. I am trying to use ORAOLEDB.ORACLE
>provider.
>
># TNSNAMES.ORA Network Configuration File:
>E:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
># Generated by Oracle configuration tools.
>
>ORACLE.UNIVERSE.COM =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = <b>sun3</b>)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVICE_NAME = Oracle.Universe)
> )
> )
>
>EXTPROC_CONNECTION_DATA.UNIVERSE.COM =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
> )
> (CONNECT_DATA =
> (SID = PLSExtProc)
> (PRESENTATION = RO)
> )
> )
>
>INST1_HTTP.UNIVERSE.COM =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = sun3)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVER = SHARED)
> (SERVICE_NAME = MODOSE)
> (PRESENTATION = http://HRService)
> )
> )
>
>OEMREP.UNIVERSE.COM =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = sun3)(PORT = 1521))
> )
> (CONNECT_DATA =
> (SERVER = DEDICATED)
> (SERVICE_NAME = OEMREP.universe.com)
> )
> )
>
>
>"Robert Dimitrovski" <robert.dimitrovski_at_ht.hr> wrote in message news:<1055154867.340209_at_tuxri2.tkcrij.ht.hr>...
>> I had made a connection with Oracle base 8.1.7 and this is it:
>> .Open "Provider=MSDAORA.1;Data Source=name you use in tnsnames;" & _
>> "DNS=name of DNS;User Id=" & Text2.Text & ";Password=" & Text3.Text &
>> ";"
>> I see in your code that you don't have DNS.
>>
>> "js" <androidsun_at_yahoo.com> wrote in message
>> news:23869fd0.0306081949.20ecf9ff_at_posting.google.com...
>> > I have a test ASP page like the following. The IIS 5.0 and ORACLE
>> > 9i/Personal and the ASP all reside in my development machine. When
>> > browsed the ASP using IE6, the browser kept turning and eventually
>> > gave up. I created an ODBC DSN to test the connection using ODBC
>> > driver. The connection was successful. I also use VB6.0 SP1 to
>> > create a test project using the ODBC DSN and ORAOLDB. I also used the
>> > VB sample provided by Oracle in the OLEDB/SAMPLE/ directory. They all
>> > could connect to the ORACLE instance. I just can not get the ASP
>> > connection working. The same connection strings are used in all test.
>> > Please help. Thanks.
>> >
>> > <%option explicit%>
>> > <%
>> > Response.Expires = -1 'expires immediately
>> > dim strCn, cn
>> > dim strStatus
>> >
>> > 'strCn = "Provider=MSDASQL.1;Persist Security Info=False;User
>> > ID=xxx;Password=xxx;Data Source=oracle"
>> > strCn = "Provider=ORAOLEDB.Oracle;Data Source=oracle;User ID=xxx;
>> > password=xxx"
>> >
>> > set cn = server.CreateObject("ADODB.connection")
>> >
>> > with cn
>> > .connectionString = strCn
>> > .open
>> > end with
>> >
>> > Select Case cn.State
>> > Case 1 'adStateOpen
>> > strStatus = "open"
>> > Case 0 'adStateClosed
>> > strStatus = "Closed"
>> > Case Else
>> > strStatus = "Other Status (" & cn.state & ")"
>> > End Select
>> >
>> > response.write "Connection state: " & strStatus
>> > %>

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- Received on Tue Jun 10 2003 - 15:51:23 CEST

Original text of this message