Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

  1. <%@ LANGUAGE = PerlScript%>
  2. <html>
  3. <head>
  4. <meta name="GENERATOR" content="ActiveState_Hack = Dick Hardt">
  5. <!--
  6. Copyright (c) 1996, Microsoft Corporation. All rights reserved.
  7. Developed by ActiveState Internet Corp., http://www.ActiveState.com
  8. -->
  9. <title>Active X Database Object</title>
  10. </head>
  11. <body>
  12. <BODY BGCOLOR=#FFFFFF>
  13. <!--
  14. ActiveState PerlScript sample
  15. PerlScript: The coolest way to program custom web solutions.
  16. -->
  17. <!-- Masthead -->
  18. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  19. <TR VALIGN=TOP ><TD WIDTH=400>
  20. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  21. </TD></TR></TABLE>
  22. <H3>ActiveX Data Object (ADO)</H3>
  23. <hr>
  24. <%
  25. $Conn = $Server->CreateObject("ADODB.Connection");
  26. $Conn->Open( "ADOSamples" );
  27. $sql = "select ProductName, ProductDescription from Products where ProductType in ('Boot', 'Tent')";
  28. $RS = $Conn->Execute($sql);
  29. %>
  30. <P><h3> Here are the results from the query:<BR><i> <%= $sql %></i></h3><P>
  31. <TABLE BORDER>
  32. <%
  33. while ( ! $RS->{EOF} ) {
  34. %><TR><TD>
  35. <%=$RS->Fields(0)->{Value}%></TD><TD>
  36. <%=$RS->Fields(1)->{Value}%></TD></TR>
  37. <%$RS->MoveNext;
  38. }
  39. $RS->close;
  40. $Conn->close;%>
  41. </TABLE>
  42. <!-- +++++++++++++++++++++++++++++++++++++
  43. here is the standard showsource link -
  44. Note that PerlScript must be the default language --> <hr>
  45. <%
  46. $url = $Request->ServerVariables('PATH_INFO')->Item;
  47. $_ = $Request->ServerVariables('PATH_TRANSLATED')->Item;
  48. s/[\/\\](\w*\.asp\Z)//m;
  49. $params = 'filename='."$1".'&URL='."$url";
  50. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  51. %>
  52. <A HREF="index.htm"> Return </A>
  53. <A HREF="showsource.asp?<%=$params%>">
  54. <h4><i>view the source</i></h4></A>
  55. </BODY>
  56. </HTML>