
利用asp相關的函數動態更新access數據庫結構,
drs.open "alter table [new] add column [conter] varchar(255)",conn,1,3 '為表new添加一個 conter列,類型:文本 大小:長度為255
drs.open "alter table [new] drop column [game]",conn,1,3 '刪除new表中的game列
on error resume next '打開錯誤處理
set rs=server.CreateObject("adodb.recordset") '在表new中刪除 game 字段
drs.open "alter table [new] drop column [game]",conn,1,3 'drop刪除
drs.open "alter table [new] drop column [conter] varchar(255)" '添加conter 字段,類型為:文本,長度:255
if Err then '出錯處理
response.write "<font color='red'>刪除 hhtml 字段失敗,原因:"&Err.Description&"</font>" & vbcrlf
Err.Clear
else '正確處理
response.write "<font color='blue'>刪除 hhtml 字段成功</font>" & vbcrlf
end if
rs.close
set rs=nothing
您發布的評論即表示同意遵守以下條款:
一、不得利用本站危害國家安全、泄露國家秘密,不得侵犯國家、社會、集體和公民的合法權益;
二、不得發布國家法律、法規明令禁止的內容;互相尊重,對自己在本站的言論和行為負責;
三、本站對您所發布內容擁有處置權。