<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'how to retrieve dbms_output PL/SQL information in ASP' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'how to retrieve dbms_output PL/SQL information in ASP' posted on the 'Active Server Pages' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2012 Programmers Heaven</copyright>
    <pubDate>Wed, 23 May 2012 07:48:22 -0700</pubDate>
    <lastBuildDate>Wed, 23 May 2012 07:48:22 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>how to retrieve dbms_output PL/SQL information in ASP</title>
      <link>http://www.programmersheaven.com/mb/aspfaq/396872/396872/how-to-retrieve-dbms_output-plsql-information-in-asp/</link>
      <description>I have an ASP page that runs a simple PL/SQL "begin-end" and writes a variable to the DBMS_OUTPUT with a "put_line" command.  (see code)&lt;br /&gt;
&lt;br /&gt;
DECLARE &lt;br /&gt;
strText varchar2(50) := 'Testing Testing Testing'; &lt;br /&gt;
BEGIN &lt;br /&gt;
dbms_output.enable(10000); &lt;br /&gt;
dbms_output.put_line(strText); &lt;br /&gt;
END;&lt;br /&gt;
&lt;br /&gt;
This code runs fine in TOAD and also in my ASP page (not ASP.net).  Well, at least i'm not getting any errors related to my ADO connection to ORACLE.  However, I'm not able to display the strText variable.  I created an ADO paramater to go along with the ADO command object i use to run this PL/SQL, but nothing is displyed.   Any suggestions?  Here is my ASP code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
set cnn = nothing&lt;br /&gt;
Set cnn = Server.CreateObject("ADODB.Connection")&lt;br /&gt;
cnn.Open "Driver={Microsoft ODBC for Oracle}; Server=xxxx; Uid=xxxx; Pwd=xxxx"&lt;br /&gt;
set cmd = Server.CreateObject("ADODB.Command")&lt;br /&gt;
&lt;br /&gt;
strSQL = "DECLARE " &amp;amp; chr(13)&lt;br /&gt;
strSQL = strSQL &amp;amp; "strText varchar2(50) := 'Testing Testing Testing'; " &amp;amp; chr(13)&lt;br /&gt;
strSQL = strSQL &amp;amp; "BEGIN " &amp;amp; chr(13)&lt;br /&gt;
strSQL = strSQL &amp;amp; "dbms_output.enable(10000); " &amp;amp; chr(13)&lt;br /&gt;
strSQL = strSQL &amp;amp; "dbms_output.put_line(strText); " &amp;amp; chr(13)&lt;br /&gt;
(13)&lt;br /&gt;
strSQL = strSQL &amp;amp; "END;"&lt;br /&gt;
&lt;br /&gt;
set prm0 = server.CreateObject("ADODB.Parameter")&lt;br /&gt;
set prm0 = cmd.CreateParameter("@strText", 200, 3, 50, "")&lt;br /&gt;
&lt;br /&gt;
cmd.Parameters.Append prm0&lt;br /&gt;
&lt;br /&gt;
cmd.ActiveConnection = cnn&lt;br /&gt;
cmd.CommandText = strSQL&lt;br /&gt;
cmd.CommandType = 1&lt;br /&gt;
&lt;br /&gt;
cmd.Execute  	&lt;br /&gt;
&lt;br /&gt;
if err.number &amp;lt;&amp;gt; 0 then&lt;br /&gt;
	Response.Write "Error occurred - error number is " &amp;amp; err.number &amp;amp; "&amp;lt;BR&amp;gt;" &amp;amp; " and message is " &amp;amp; err.Description &amp;amp; "&amp;lt;BR&amp;gt;"&lt;br /&gt;
end if&lt;br /&gt;
&lt;br /&gt;
Response.Write "strText = " &amp;amp; prm0.Value &amp;amp; "&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;"&lt;br /&gt;
&lt;br /&gt;
set prm0 = nothing&lt;br /&gt;
set cmd = nothing&lt;br /&gt;
cnn.Close&lt;br /&gt;
set cnn = nothing&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/aspfaq/396872/396872/how-to-retrieve-dbms_output-plsql-information-in-asp/</guid>
      <pubDate>Tue, 08 Sep 2009 15:06:28 -0700</pubDate>
      <category>Active Server Pages</category>
    </item>
    <item>
      <title>Re: how to retrieve dbms_output PL/SQL information in ASP</title>
      <link>http://www.programmersheaven.com/mb/aspfaq/396872/416753/re-how-to-retrieve-dbms_output-plsql-information-in-asp/#416753</link>
      <description>Did you figure this out? I'm having a similar problem.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/aspfaq/396872/416753/re-how-to-retrieve-dbms_output-plsql-information-in-asp/#416753</guid>
      <pubDate>Wed, 26 May 2010 18:55:21 -0700</pubDate>
      <category>Active Server Pages</category>
    </item>
  </channel>
</rss>
