'复制数据函数
'参数con:ADODB.Connection数据库连接对象
'参数rs:要复制的原始记录集对象
'参数num:复制多少次记录
'参数tableName:复制的表名
Function CopyRecord(con,rs,num,tableName) Dim rsCopy,i,j Set rsCopy=Server.CreateObject("ADODB.RecordSet") rsCopy.Open "select * from "&tableName,con,1,3 For i=0 To num rsCopy.AddNew For j=0 To rs.Fields.Count-1 rsCopy.Fields(j).Value=rs.Fields(j).Value Next Next rsCopy.Update rsCopy.Close Set rsCopy=Nothing
End Function