佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > set rs=server.CreateObject(adodb.recordset) 的中文詳細說明

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

熱門標簽:科大訊飛語音識別系統(tǒng) 服務(wù)器配置 阿里云 Mysql連接數(shù)設(shè)置 團購網(wǎng)站 Linux服務(wù)器 銀行業(yè)務(wù) 電子圍欄
是建立一個數(shù)據(jù)集
前面應(yīng)該先定義此數(shù)據(jù)集
dim rs as adodb.recordset
然后就可以用
set rs=server.CreateObject("adodb.recordset")
來建立一個數(shù)據(jù)集的實例,當(dāng)然此時數(shù)據(jù)集中是沒有數(shù)據(jù)的
rs.open ......
來打開一個記錄集
rs.append或者rs.insert來添加記錄
rs.edit來修改記錄
對于添加或修改的記錄,可以用
rs.fields("字段名")=xxx
來進行賦值
rs.update
把更改過的值更新回數(shù)據(jù)庫
當(dāng)你添加一個數(shù)據(jù)(rs1)進數(shù)據(jù)庫時:
rs.addnew
rs("rs1")="添加的數(shù)據(jù)"
rs.update
rs.close
set rs=nothing
下面我們來個實例:
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=Replyid=% =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>

標簽:棗莊 江蘇 衡水 大理 蚌埠 萍鄉(xiāng) 衢州 廣元

巨人網(wǎng)絡(luò)通訊聲明:本文標題《set rs=server.CreateObject(adodb.recordset) 的中文詳細說明》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    贵溪市| 和田县| 钟祥市| 大邑县| 项城市| 大新县| 仙游县| 台东市| 惠州市| 藁城市| 宁海县| 广德县| 翁源县| 敦化市| 常宁市| 广昌县| 策勒县| 安陆市| 北海市| 齐齐哈尔市| 阳山县| 张家港市| 太谷县| 中超| 休宁县| 武威市| 运城市| 仙桃市| 虞城县| 新邵县| 新泰市| 淮滨县| 蒙城县| 青海省| 海兴县| 河间市| 竹山县| 双城市| 隆回县| 那坡县| 永泰县|