首页 > 开发 > 综合 > 正文

本地使用RecordSet 对象

2024-07-21 02:22:45
字体:
来源:转载
供稿:网友
dim i as integer
    dim rsconstruct as adodb.recordset
    set rsconstruct = new adodb.recordset

'构造recordset 的字段名和类型
    rsconstruct.fields.append "field1", adinteger
    rsconstruct.fields.append "field2", advarwchar, 128
    rsconstruct.fields.append "field3", advarwchar, 128
    rsconstruct.fields.append "field4", advarwchar, 128
    rsconstruct.open
    '增加记录至reocrdset
    if coltemp.count > 0 then
        for i = 1 to coltemp.count
            rsconstruct.addnew
                   rsconstruct.fields("field1") = 0
                   rsconstruct.fields("field2") = coltemp.item(i).subject
                   rsconstruct.fields("field3") = coltemp.item(i).description
                   rsconstruct.fields("field4") = coltemp.item(i).refurl
            rsconstruct.update
        next

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表