📄 showcode.asp@source=demo_ado_getrows
字号:
<HTML>
<HEAD></HEAD>
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<html><br /><body><br /><br /><FONT COLOR=#ff0000><%<br />set conn=Server.CreateObject("ADODB.Connection")<br />conn.Provider="Microsoft.Jet.OLEDB.4.0"<br />conn.Open(Server.Mappath("/db/northwind.mdb"))<br />set rs = Server.CreateObject("ADODB.recordset")<br />rs.Open "Select * from Customers", conn<br /><br />'The first number indicates how many records to copy<br />'The second number indicates what recordnumber to start on<br />p=rs.GetRows(2,0)<br /><br />response.write("<p>This example returns the value of the first column in the first two records:</p>")<br />response.write(p(0,0))<br />response.write("<br />")<br />response.write(p(0,1))<br /><br />response.write("<p>This example returns the value of the first three columns in the first record:</p>")<br />response.write(p(0,0))<br />response.write("<br />")<br />response.write(p(1,0))<br />response.write("<br />")<br />response.write(p(2,0))<br /><br />rs.close<br />conn.close<br />%></FONT><br /><br /></body><br /></html><br />
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -