home *** CD-ROM | disk | FTP | other *** search
/ Perfect Web Design / Dokonaly-Webdesign_covermount.bin / files / ASP.EXE / data.z / adotest.asp < prev    next >
Encoding:
Text File  |  1996-12-09  |  1.4 KB  |  64 lines

  1. <HTML>
  2. <HEAD><TITLE>ADO Test</TITLE></HEAD>
  3. <BODY BGCOLOR=#FFFFFF>
  4. <H1>ADO Test</H1>
  5. <% 
  6.   Set C = Server.CreateObject("ADODB.Connection")
  7.   C.Open "ADOSamples"
  8. %>
  9. <LI><FONT SIZE=4>Connection Properties</FONT>
  10. <TABLE BORDER=1>
  11. <%  For Item = 0 To C.Properties.Count - 1 %>
  12. <TR>
  13. <TD><FONT SIZE=2>
  14. <%= C.Properties(Item).Name %></FONT></TD>
  15.  
  16. <TD><B><FONT SIZE=2>
  17. <%
  18.   ' Print something so that the table border gets displayed
  19.   If IsEmpty(C.Properties(Item)) Then
  20.     Response.Write "  "
  21.   ' Determine if the property is a Boolean
  22.   ElseIf VarType(C.Properties(Item)) = 11 Then
  23.     Response.Write CStr(CBool(C.Properties(Item)))
  24.   Else
  25.     Response.Write C.Properties(Item)
  26.   End If
  27. %>
  28. </FONT></B></TD>
  29. </TR>
  30. <% Next %>
  31. </TABLE>
  32.  
  33. <P>
  34. <LI><FONT SIZE=4>Resultset Properties</FONT>
  35. <BR>
  36.  
  37. <% Set RS = C.Execute("SELECT * FROM Products") %>
  38.  
  39. <TABLE BORDER=1>
  40.  
  41. <% For Item = 0 To RS.Properties.Count - 1 %>
  42. <TR>
  43. <TD><FONT SIZE=2><%=RS.Properties(Item).Name%></FONT></TD>
  44. <TD><B><FONT SIZE=2>
  45. <%
  46.   ' Determine if the property is a Boolean
  47.   If VarType(RS.Properties(Item)) = 11 Then
  48.     Response.Write CStr(CBool(RS.Properties(Item)))
  49.   Else
  50.     Response.Write RS.Properties(Item)
  51.   End If
  52. %>
  53. </FONT></B></TD>
  54. </TR>
  55. <% Next %>
  56. </TABLE>
  57.  
  58. <% RS.Close %>
  59. <% C.Close %>
  60. <BR>
  61. <BR>
  62. <!--#include virtual="/ASPSamp/Samples/srcform.inc"--> 
  63. </BODY>
  64. </HTML>