国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

set rs=server.CreateObject("adodb.recordset") 的中文詳細(xì)說明

2020-07-27 12:50:40
字體:
供稿:網(wǎng)友
是建立一個數(shù)據(jù)集
前面應(yīng)該先定義此數(shù)據(jù)集
dim rs as adodb.recordset
然后就可以用
set rs=server.CreateObject("adodb.recordset")
來建立一個數(shù)據(jù)集的實(shí)例,當(dāng)然此時(shí)數(shù)據(jù)集中是沒有數(shù)據(jù)的
rs.open ......
來打開一個記錄集
rs.append或者rs.insert來添加記錄
rs.edit來修改記錄
對于添加或修改的記錄,可以用
rs.fields("字段名")=xxx
來進(jìn)行賦值
rs.update
把更改過的值更新回?cái)?shù)據(jù)庫
當(dāng)你添加一個數(shù)據(jù)(rs1)進(jìn)數(shù)據(jù)庫時(shí):
rs.addnew
rs("rs1")="添加的數(shù)據(jù)"
rs.update
rs.close
set rs=nothing
下面我們來個實(shí)例:
Set mRs= Server.CreateObject("adodb.recordSet")
mRs.open "Select * from book", conn, 1, 3
mRs.addnew
mRs("Name") = Name
mRs("Mail") = Mail
mRs("Qq") = Qq
mRs("Info") = Info
mRs("time") = now()
mRs.update
mRs.close
Set mRs = nothing
//下面是調(diào)用html輸入框
復(fù)制代碼 代碼如下:

<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
<form name="form1" method="post" action="admin/<% =filename %>?action=Reply&id=<% =id %>">
<tr>
<td width="118" height="37" align="center" bgcolor="#EFEFEF">昵稱:</td>
<td width="640">
<input name="Name" type="text" class="input" value="<% =mRs("Name") %>">
</td>
</tr>
<tr>
<td width="118" height="37" align="center" bgcolor="#EFEFEF">內(nèi)容是否公開:</td>
<td width="640">
<input type="radio" name="Qq" value="1" <%if mRs("qq")=1 then response.write " checked " end if%> >

<input name="Qq" type="radio" value="0" <%if mRs("qq")=0 then response.write " checked " end if%> >
否 </td>
</tr>
<tr>
<td width="118" height="37" align="center" bgcolor="#EFEFEF">郵箱:</td>
<td width="640">
<input name="Mail" type="text" class="input" value="<% =mRs("Mail") %>">
</td>
</tr>
<tr>
<td width="118" height="37" align="center" bgcolor="#EFEFEF">留言:</td>
<td width="640">
<textarea name="Info" rows="9" cols="57" class="button"><% =mRs("Info") %></textarea>
</td>
</tr>
<tr>
<td height="25" align="center" bgcolor="#EFEFEF" width="118">回復(fù):</td>
<td height="100" rowspan="2" bgcolor="#EFEFEF" width="640">
<textarea name="Reply" rows="6" cols="50" class="button"><% =Reply %></textarea>
</td>
</tr>
<tr>
<td height="70" bgcolor="#EFEFEF" width="118"></td>
</tr>
<tr>
<td height="20" colspan="2" align="center" bgcolor="#EFEFEF">
<input name="Submit1" type="submit" id="Submit" value=" 回復(fù)留言 " class="button">
<input name="reSet" type="reSet" id="reSet4" value=" 重新輸入 " class="button">
</td>
</tr>
</form>
</table>
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 辉南县| 旺苍县| 霍邱县| 青海省| 汝州市| 通江县| 长海县| 青冈县| 衡阳县| 三都| 高邮市| 安阳市| 镇赉县| 勃利县| 台安县| 保定市| 镇原县| 仁化县| 溧阳市| 阳高县| 庆城县| 奈曼旗| 福鼎市| 锦屏县| 五原县| 英超| 浦东新区| 日土县| 阿图什市| 林口县| 鹰潭市| 仪征市| 鸡泽县| 托克托县| 岫岩| 鹤山市| 封丘县| 宁德市| 克东县| 云浮市| 南城县|