%@ LANGUAGE = PerlScript%>
Active X Database Object
ActiveX Data Object (ADO)
<%
$Conn = $Server->CreateObject("ADODB.Connection");
$Conn->Open( "ADOSamples" );
$sql = "select ProductName, ProductDescription from Products where ProductType in ('Boot', 'Tent')";
$RS = $Conn->Execute($sql);
%>
Here are the results from the query:
<%= $sql %>
<%
while ( ! $RS->{EOF} ) {
%>
<%=$RS->Fields(0)->{Value}%> |
<%=$RS->Fields(1)->{Value}%> |
<%$RS->MoveNext;
}
$RS->close;
$Conn->close;%>
<%
$url = $Request->ServerVariables('PATH_INFO')->Item;
$_ = $Request->ServerVariables('PATH_TRANSLATED')->Item;
s/[\/\\](\w*\.asp\Z)//m;
$params = 'filename='."$1".'&URL='."$url";
$params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
%>
Return
view the source