Frog Frog Recommended: Usage of GetRows in ASP

zhaozj2021-02-12  168

<%

DIM CONN, STRCONN

Set conn = server.createObject ("adoDb.connection")

StrConn = "driver = {SQL Server}; server = 192.168.0.110; database = new; uid = sa; pwd = sa;"

Conn.open straconn

DIM RS_WAWA, SQL_WAWA, ARR_WAWA

SET RS_WAWA = Server.createObject ("AdoDb.Recordset")

SQL_WAWA = "SELECT TOP 5 ID, TIM WEN where lei = 161 Order By ID DESC"

RS_WAWA.Open SQL_WAWA, CONN, 1, 1

Arr_wawa = rs_wawa.getrows ()

RS_wawa.close ()

SET RS_WAWA = Nothing

%>

<% IF ubound (arr_wawa) <> 0 THEN%>

<% for i = 0 to Ubound (arr_wawa, 2) -1%>

转载请注明原文地址:https://www.9cbs.com/read-6761.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.048, SQL: 9