Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Please Help --> ASP & Oracle numbers
From memory try
> The Database ID:
>
> <%=cstr(RS( "DBID" ))%>
"James Alger" <james.alger_at_bt.com> wrote in message
news:9optjh$72j$1_at_pheidippides.axion.bt.co.uk...
> Could anybody please help me. I am using a ODCB connection to an oracle
> database, and trying to print out some details to my page.
> If I attempt to use the method below to print out a string variable
> from the database then it works. However, if I try the same code to print
> out a number variable (DBID- It does exist, and it is a number) it
responds
> with
>
> > The Database ID: error '80020009'
> > Exception occurred.
> > ?
>
> on the web page. I have attempted the same thing using an Access
> database instead of an Oracle database, and it works with no problem. Any
> help anyone can give me would be greatly appreciated.
>
> The Page:
>
> <HTML>
> <HEAD>
> <TITLE> Tserver Selection </TITLE>
> </HEAD>
>
> <%
> 'Set up connection to the database.
> Set Con = Server.CreateObject("ADODB.Connection")
> Con.Open "DSN=TestProg;UID=password;PWD=password;"
>
> Set RS = Server.CreateObject("ADODB.Recordset")
> RS.ActiveConnection = Con
>
> RS.Open = "SELECT DBID FROM CFG_DN"
> %>
>
> The Database ID:
>
> <%=RS( "DBID" )%>
>
> </BODY>
> </HTML>
>
>
>
>
Received on Tue Sep 25 2001 - 09:26:20 CDT
![]() |
![]() |