Re: CLOB and ASP
Date: Wed, 10 Jan 2001 14:13:04 GMT
Message-ID: <93hql7$o6p$1_at_nnrp1.deja.com>
Here is an example of part of this using OO4O, the rest of the operations are just as easy and are pretty well documented in the OO4O help. It also comes with ASP examples for other stuff.
Name: Writing BLOB with ASP and IIS
Category: OO4O
Port: WIN32
Description: Demonstrates writing the content of a CLOB field when
using the Response.Write command. To do this, you must first Read the
CLOB content to a Variable
'The following sets up the data.
SQL> create table clob_table (clob_id number(5), clob_column CLOB); SQL> insert into clob_table values (1, EMPTY_CLOB()); SQL> update clob_table
2 set clob_column = 'Hello World';
SQL> commit;
'******************************************************The Global.asa file is as follows.
<OBJECT RUNAT=Server SCOPE=Application ID=OraSession
PROGID="OracleInProcServer.XOraSession">
</OBJECT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
End Sub
Sub Session_OnStart
Set Session("OraDatabase") = OraSession.OpenDatabase
("V8i", "scott/tiger", 0)
Set OraDatabase = Session("OraDatabase") End Sub
Sub Session_OnEnd
Set Session("OraDatabase") = Nothing Set Session("OraDynaset") = NothingEnd Sub
</SCRIPT>
The CLOBDemo.Asp page is
<%_at_ Language=VBScript %>
<%
session.Abandon
set OraDatabase=Session("OraDatabase")
set OraDynaset=OraDatabase.CreateDynaset("select clob_column from
clob_table where clob_id = 1 ", 0)
Set OraCLOB = OraDynaset.Fields("Clob_column").Value
amountRead = OraClob.Read (buffer)
Response.Write(buffer)
%>
-- -cheers DW -------------------------------------------------------------------- [Quoted] "It is a kind of good deed to say well; and yet words are not deeds. -William Shakespeare" Sent via Deja.com http://www.deja.com/Received on Wed Jan 10 2001 - 15:13:04 CET