updatedatetime.asp

(完整代码) 1KB


<%
connstr="DRIVER={SQL Server};Server=.;UID=sa;PWD=;DATABASE=netshipinxiaoshouxns;"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
set rs=server.createobject("adodb.recordset")
%>


<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改数据库所有表内时间</title>
</head>

<body>


      <%
set  rsSchema=conn.openSchema(20)

rsSchema.movefirst
Do  Until  rsSchema.EOF
if  rsSchema("TABLE_TYPE")="TABLE" and rsSchema("TABLE_NAME")<>"dtproperties" then
	sql="select * from "&rsSchema("TABLE_NAME")&""

	rs.open sql,conn,1,1
	if rs.eof then
	else
		do while not rs.eof
			for k=0 to rs.fields.count-1
				'response.Write(rs.fields(k))
				'response.End()
				if rs.fields(k).name="addtime" then
					tmptime=date&" "&right(rs(k),8)
					sql="update "&rsSchema("TABLE_NAME")&" set addtime='"&tmptime&"'"
					'response.Write(sql)
					'response.End()
					conn.execute(sql)
				end if
				
			next
	
		rs.movenext
		loop
	end if
	rs.close
	
end  if
rsSchema.movenext
Loop
response.write("ok")

%>

</body>
</html>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。