思路,全局过程,传递几个需要入库的变量, 在每次重要操作后,CALL write_log(..........) 就可以了。 dim cn as new adodb.connection public sub conn cn.open ....... end subpublic function write_log(ks_time as string,ks_time as string,jg as string,nr as string) call conn cn.execute("insert into log (.......) values ('"&ks_time&"','"&jstime&"','"&jg&"','"&nr&"')") cn.close end function
在每次重要操作后,CALL write_log(..........)
就可以了。
dim cn as new adodb.connection
public sub conn
cn.open .......
end subpublic function write_log(ks_time as string,ks_time as string,jg as string,nr as string)
call conn
cn.execute("insert into log (.......) values ('"&ks_time&"','"&jstime&"','"&jg&"','"&nr&"')")
cn.close
end function