Oracle Objects For OLE (OO4O) 2.3

<% SqlQuery = Request.Form("sqlquery") %>

This sample executes a SQL "SELECT" query and returns the result as an HTML table. The database connection used in this script is obtained from a pool that is created when the global.asa is executed.

SQL Select Query:

<% If SqlQuery = "" Then %> <% Else %> <% Set OraDatabase = OraSession.GetDatabaseFromPool(10) Set OraDynaset = OraDatabase.CreateDynaset(SqlQuery,0) Set Columns= OraDynaset .Fields %>
<% For i = 0 to Columns.Count - 1 %> <% Next %> <% while NOT OraDynaset.EOF %> <% For col = 0 to Columns.Count - 1 %> <% Next %> <% OraDynaSet.MoveNext %> <% WEnd %>
<% = Columns(i).Name %>
<% = Columns(col) %>

<%End If%>