Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Front End switch
Hi
As you have a development environment of NT, I would guess that you intend to deploy on one or more NT/2000 boxes. In this case I would strongly recommend IIS and ASP as your platform.
Most intro's to asp will show you how to perform a db connection using ado. This isn't your only option though as you should also consider oo40 to perform the connection.
To perform a connection using ado using something like the following
<%
set adoConn = Server.CreateObject("adodb.connection")
adoConn.ConnectionString = "PROVIDER=MSDAORA.1;DATA SOURCE=<tnsalias>;USER
ID=<username>;PASSWORD=<password>;"
adoConn.Open
%>
you could try changing the provider to the latest Oracle Oledb provider if you get poor performance.
To perform a connection using oo40 try the following (lifted from the oracle objects helpfile)
<%
'Create the OraSession Object.
Set OraSession = CreateObject("OracleInProcServer.XOraSession")
'Create the OraDatabase Object by opening a connection to Oracle.
Set OraDatabase = OraSession.OpenDatabase("ExampleDb", "scott/tiger", 0&)
%>
As far as selects go the following is lifted directly from a web site I knocked up to report on traffic through a remote access device. adoConn is my connection object.
<%
sSql = "Select username,round(sum(bytes_out)/(1048576),2)
Traffic,round(sum(elapsed_time/3600),2) Time "
sSQL = sSQL & " from log_records where flag = 'stop' and call_date >
sysdate - 31 "
sSQL = sSQL & " group by username ORDER BY 3 DESC "
set rsResults = adoConn.execute(sSQL)
Do while not rsResults.EOF
%>
<TR>
<TD width="132">
<%
if isnull(rsResults.Fields("username")) then
Response.Write(" ")
else
Response.write(rsResults.Fields("username") )
end if
%>
</TD> <TD width="113"> <%if isnull(rsResults.Fields("Traffic")) thenResponse.Write(" ")
</TD> <TD width="108"> <% if isnull(rsResults.Fields("Time")) thenResponse.Write(" ")
Hope that is enough to set you going.
-- Niall Litchfield Oracle DBA Audit Commission UK "Gerry Stijlemans" <gerry.stijlemans_at_pandora.be> wrote in message news:aBcS5.185652$iI2.3513452_at_afrodite.telenet-ops.be... > Hi there , > > I have an oracle database (back-end) where I have written an client > access-application at the front-end. > Now there is an decision to switch the client to an webapplication so the > users can use a simple browser in stead off the access-client. > I have an developpement server NT4.0 with oracle 8i enterpriseedition to > devellop all this. > I 'm familiar with html but how can I connect in html to an oracle database > ? > Actually the client is doing nothing more than select , insert and update > table statements. > Do I have to use Java for this or something else ? > Can some-one also giving me an example off a html page for logon to the > oracle database ? > and the same things I do now with my access-client application(select,insert > and update tables). > > > Thx a lot !!!! > > > > Gerry > > > > > > > >Received on Tue Nov 21 2000 - 03:12:15 CST
![]() |
![]() |