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.

54 lines
1.6 KiB

  1. <%@ LANGUAGE = PerlScript%>
  2. <html>
  3. <head>
  4. <meta name="GENERATOR" content="Tobias Martinsson">
  5. <title>ADO Constants</title>
  6. </head>
  7. <body>
  8. <BODY BGCOLOR=#FFFFFF>
  9. <!--
  10. ActiveState PerlScript sample
  11. PerlScript: The coolest way to program custom web solutions.
  12. -->
  13. <!-- Masthead -->
  14. <TABLE CELLPADDING=3 BORDER=0 CELLSPACING=0>
  15. <TR VALIGN=TOP ><TD WIDTH=400>
  16. <A NAME="TOP"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="ActiveState PerlScript" BORDER=0></A><P>
  17. </TD></TR></TABLE>
  18. <HR>
  19. <H3>ActiveX Data Objects (ADO) Constants</H3>
  20. Loads the ADO 2.5 constants and dumps them to the screen. This example is a small modification of the example of loading Word-constants available in the Win32::OLE::Const documentation. You can also write it as "use Win32::OLE::Const('Microsoft ActiveX Data Objects 2.5');".
  21. <p>
  22. <%
  23. use Win32::OLE::Const;
  24. my $ado = Win32::OLE::Const->Load('Microsoft ActiveX Data Objects 2.5');
  25. foreach my $key (keys %$ado) {
  26. $Response->Write(<<EOF);
  27. $key = $ado->{$key} <br>
  28. EOF
  29. }
  30. %>
  31. <!-- +++++++++++++++++++++++++++++++++++++
  32. here is the standard showsource link -
  33. Note that PerlScript must be the default language --> <hr>
  34. <%
  35. $url = $Request->ServerVariables('PATH_INFO')->item;
  36. $_ = $Request->ServerVariables('PATH_TRANSLATED')->item;
  37. s/[\/\\](\w*\.asp\Z)//m;
  38. $params = 'filename='."$1".'&URL='."$url";
  39. $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
  40. %>
  41. <A HREF="index.htm"> Return </A>
  42. <A HREF="showsource.asp?<%=$params%>">
  43. <h4><i>view the source</i></h4></A>
  44. </BODY>
  45. </HTML>