'添加数据函数
'DataAry():数据数组
'TableName:表名
'con:ADODB.Connection
Function UpdateData(DataAry(),TableName,con,PramKey)
On Error Resume Next
Dim rsAdd,sql,i,j
sql="select * from "&TableName&" where "&PramKey
'选择字段后这里的SQL语句也要改,或者修改这个方法加个SQL语句参数
Set rsAdd=CreateRecordSet(sql,con)
FillRecordSet rsAdd,DataAry
rsAdd.Update
CloseRecordSet rsAdd
IF Err.Number<>0 Then
AddData=Err.Description
Else
AddData=""
End IF
End Function