本地使用RecordSet 对象

80酷酷网    80kuku.com

  对象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

分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: