當我們的資料庫不在本地時,需要通過程式來實施更新,可以采用下面的方法。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
</body>
<!-- #include file="../includes/conn.asp" -->
</html>
20061204資料庫更新:增加資料庫表的字段<br>
<%
sql="ALTER TABLE Tab_Activitysign ADD sign_time datetime NULL "
conn.execute(sql)
If Err Then
Response.Write TableTop & "更新Tab_Activitysign表<font color=blue>失敗</font>,原因:" & Err.Description & "<BR>" & TableEnd
Err.Clear
Response.Flush
Else
Response.Write TableTop & "更新Tab_Activitysign成功<BR>" & TableEnd
End If
conn.close
set conn=nothing
%>
本文轉自 simeon2005 51CTO部落格,原文連結:http://blog.51cto.com/simeon/11478