home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / MS_DEV / VID / SERVER / ASF / DATA.Z / adotest.asp < prev    next >
Text File  |  1996-10-07  |  6KB  |  120 lines

  1. <HTML>
  2. <HEAD><TITLE>ADO Test</TITLE></HEAD>
  3. <BODY>
  4. <H1>ADO Test</H1>
  5. <H3><color="red" UNDONE></H3>
  6. <% 
  7. Set C = Server.CreateObject("ADODB.Connection")
  8. C.Open "ADOSamples" 
  9. %>
  10.  
  11. <LI><FONT SIZE=4>Connection Properties</FONT>
  12. <TABLE BORDER=1>
  13. <%  for item=0 to c.properties.count-1 %>
  14. <TR>
  15. <TD><FONT SIZE=2><%=c.properties(item).Name%></FONT></TD>
  16. <TD><B><FONT SIZE=2><%=c.properties(item)%></FONT></B></TD>
  17. </TR>
  18. <% next %>
  19.  
  20. <!--  old stuff
  21. <TR><TD><FONT SIZE=2>ConnectionString</FONT></TD><TD><FONT SIZE=2>r/w</FONT>
  22. </TD><TD><FONT SIZE=2>Reflects the connection string or information used to connect to the data source. This property may be set while the connection is not actually open but should become read-only once the Open method has succeeded.
  23. </TD><TD><FONT SIZE=2>N/A</FONT></TD><TD><FONT SIZE=2>N/A</FONT>
  24. </TD><TD><B><FONT SIZE=2><%=" "%><%'=C.ConnectionString%></FONT></B></TD></TR>
  25.  
  26. <TR><TD><FONT SIZE=2>ConnectionTimeout</FONT></TD><TD><FONT SIZE=2>r/w</FONT>
  27. </TD><TD><FONT SIZE=2>Controls how long (in seconds) the provider should wait while trying to open the connection to the data source. The provider should abort the connection, returning control to the client program and raising an exception, whe
  28. <P>This property should be read/write while the connection is not open, and should become read-only while the connection is actually open, becoming read/write again after the connection is closed. 
  29. will be canceled. </FONT>
  30. </TD><TD><FONT SIZE=2>15</FONT></TD><TD><FONT SIZE=2>Integer</FONT>
  31. </TD><TD><B><FONT SIZE=2><%=C.ConnectionTimeout%></FONT></B></TD></TR>
  32.  
  33. <TR><TD><FONT SIZE=2>Version</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  34. </TD><TD><FONT SIZE=2>Version of the connection-this can be the version of the ODBC driver for the c/s world, or the version of the ISAM engine for the ISAM world.</FONT>
  35. </TD><TD><FONT SIZE=2>N/A</FONT></TD><TD><FONT SIZE=2>Set by ADO</FONT>
  36. </TD><TD><B><FONT SIZE=2><%=C.Version%></FONT></B></TD></TR>
  37. -->
  38. </TABLE>
  39.  
  40. <P>
  41. <LI><FONT SIZE=4>Resultset Properties</FONT>
  42. <BR>
  43.  
  44. <% Set RS = C.Execute("SELECT * FROM Products") %>
  45.  
  46. <TABLE BORDER=1>
  47.  
  48. <%  for item=0 to RS.properties.count-1 %>
  49. <TR>
  50. <TD><FONT SIZE=2><%=RS.properties(item).Name%></FONT></TD>
  51. <TD><B><FONT SIZE=2><%=RS.properties(item)%></FONT></B></TD>
  52. </TR>
  53. <% next %>
  54.  
  55. <!--  old stuff
  56.  
  57. <TR><TD><B><FONT SIZE=2>Name</FONT></B></TD><TD><B><FONT SIZE=2>Perm.</FONT></B>
  58. </TD><TD><B><FONT SIZE=2>Description</FONT></B></TD>
  59. <TD><B><FONT SIZE=2>Default</FONT></B></TD><TD><B><FONT SIZE=2>Range</FONT></B>
  60. </TD><TD><B><FONT SIZE=2>Current Value</FONT></B></TD></TR>
  61.  
  62. <TR><TD><FONT SIZE=2>AbsolutePosition</FONT></TD><TD><FONT SIZE=2>r/w</FONT>
  63. </TD><TD><FONT SIZE=2>Refers to the absolute row number on which the resultset is positioned.</FONT>
  64. </TD><TD><FONT SIZE=2>-1</FONT></TD><TD><FONT SIZE=2>-1 to Max Long</FONT>
  65. </TD><TD><B><FONT SIZE=2><%=RS.AbsolutePosition%></FONT></B></TD></TR>
  66.  
  67. <TR><TD><FONT SIZE=2>ActiveConnection</FONT></TD><TD><FONT SIZE=2>r/w</FONT>
  68. </TD><TD><FONT SIZE=2>Reference to the connection object this resultset is using.</FONT>
  69. </TD><TD><FONT SIZE=2>Connection used to create object.</FONT>
  70. </TD><TD><FONT SIZE=2>Any valid Connection or derived object or Nothing.</FONT>
  71. </TD><TD><B><FONT SIZE=2><%=RS.ActiveConnection.Provider%></FONT></B></TD></TR>
  72.  
  73. <TR><TD><FONT SIZE=2>BOF</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  74. </TD><TD><FONT SIZE=2>True if positioned before the first row in the resultset.</FONT>
  75. </TD><TD><FONT SIZE=2>True</FONT></TD><TD><FONT SIZE=2>True | False</FONT>
  76. </TD><TD><B><FONT SIZE=2><%=RS.BOF%></FONT></B></TD></TR>
  77.  
  78. <TR><TD><FONT SIZE=2>CacheSize</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  79. </TD><TD><FONT SIZE=2>Cache Size</FONT>
  80. </TD><TD></TD><TD></TD><TD><B><FONT SIZE=2><%=RS.CacheSize%></FONT></B></TD></TR>
  81.  
  82. <TR><TD><FONT SIZE=2>CursorType</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  83. </TD><TD><FONT SIZE=2>Indicates what cursor type was used to open the result set.</FONT>
  84. </TD><TD><FONT SIZE=2>adEditNone</FONT></TD><TD><FONT SIZE=2>{adEditNone, adEditAdd, adEditInProgress}</FONT>
  85. </TD><TD><B><FONT SIZE=2><%=RS.CursorType%></FONT></B></TD></TR>
  86.  
  87. <TR><TD><FONT SIZE=2>EOF</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  88. </TD><TD><FONT SIZE=2>True if positioned after the last row of the resultset.</FONT>
  89. </TD><TD><FONT SIZE=2>True</FONT></TD><TD><FONT SIZE=2>True | False</FONT>
  90. </TD><TD><B><FONT SIZE=2><%=RS.EOF%></FONT></B></TD></TR>
  91.  
  92. <TR><TD><FONT SIZE=2>LockType</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  93. </TD><TD><FONT SIZE=2>Value of LockType parameter on the Open method used to create this object.</FONT>
  94. </TD><TD><FONT SIZE=2>adConcurReadOnly</FONT></TD><TD><FONT SIZE=2>See Lock Type constants on OpenResultset method.</FONT>
  95. </TD><TD><B><FONT SIZE=2>LockType</FONT></B></TD></TR>
  96.  
  97. <TR><TD><FONT SIZE=2>MaxRecords</FONT></TD><TD><FONT SIZE=2>r/w</FONT>
  98. </TD><TD><FONT SIZE=2>(undone) Max Records.</FONT></TD>
  99. <TD><FONT SIZE=2>First 256 chars of SQL.</FONT></TD>
  100. <TD><FONT SIZE=2>Valid string.</FONT></TD><TD><B><FONT SIZE=2><%=RS.MaxRecords%></FONT></B></TD></TR>
  101.  
  102. <TR><TD><FONT SIZE=2>RecordCount</FONT>
  103. </TD><TD><FONT SIZE=2>r/o</FONT></TD><TD><FONT SIZE=2>Number of records in resultset.</FONT>
  104. </TD><TD><FONT SIZE=2>0</FONT></TD><TD><FONT SIZE=2>0 to Max Long</FONT>
  105. </TD><TD><B><FONT SIZE=2><%=RS.RecordCount%></FONT></B></TD></TR>
  106.  
  107. <TR><TD><FONT SIZE=2>Source</FONT></TD><TD><FONT SIZE=2>r/o</FONT>
  108. </TD><TD><FONT SIZE=2>(undone)</FONT>
  109. </TD><TD><FONT SIZE=2>True</FONT></TD><TD><FONT SIZE=2>True | False</FONT>
  110. </TD><TD><B><FONT SIZE=2><%=RS.Source%></FONT></B></TD></TR>
  111. -->
  112.  
  113. </TABLE>
  114.  
  115. <% RS.Close %>
  116. <% C.Close %>
  117.  
  118. </BODY>
  119. </HTML>
  120.