public declare sub copymemory lib "kernel32" alias "rtlmovememory" (destination as any, source as any, byval length as long)
if rs.state <> adstateclosed then rs.close
copymemory rs, 0&, 4 '清空rs(等同与set rs=nothing,不过比它快)
set rs = new recordset
rs.open "select * from " & str_sql_field & " where 地点='" & str_text(1) & "' and 时间='" & str_text(2) & "' and 号码='" & str_text(3) & "' and id=1", cn, adopenkeyset, adlockoptimistic
if rs.eof then rs.addnew '判断数据库中记录是否存在,如果不存在,则新增(addnew),如果存在,则直接覆盖(注意:自动编号类型的列是不能覆盖的,会出错)
for j = i to int_sum
rs!str_name(j) = str_text(j)
next j
rs.update
rs.close