19
2020
03

GetString

ASP源代码:

<html>

<body>


<%

set conn=Server.CreateObject("ADODB.Connection")

conn.Provider="Microsoft.Jet.OLEDB.4.0"

conn.Open(Server.Mappath("/db/northwind.mdb"))

set rs = Server.CreateObject("ADODB.recordset")

rs.Open "SELECT Companyname, Contactname FROM Customers", conn

str=rs.GetString(,,"</td><td>","</td></tr><tr><td>"," ")

%>


<table border="1" width="100%">

   <tr>

     <td><%Response.Write(str)%></td>

   </tr>

</table>


<%

rs.close

conn.close

set rs = Nothing

set conn = Nothing

%>


</body>

</html>

运行结果:

Screenshot_20200319_151150.jpg

« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。