
利用asp相關(guān)的函數動(dòng)態(tài)更新access數據庫結構,
drs.open "alter table [new] add column [conter] varchar(255)",conn,1,3 '為表new添加一個(gè) conter列,類(lèi)型:文本 大小:長(cháng)度為255
drs.open "alter table [new] drop column [game]",conn,1,3 '刪除new表中的game列
on error resume next '打開(kāi)錯誤處理
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 字段,類(lèi)型為:文本,長(cháng)度: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
呢 稱(chēng): | |
表 情: | |
內 容: |
評論內容:不能超過(guò) 1000 字,需審核,請自覺(jué)遵守互聯(lián)網(wǎng)相關(guān)政策法規。 |
驗證碼: | |
您發(fā)布的評論即表示同意遵守以下條款:
一、不得利用本站危害國家安全、泄露國家秘密,不得侵犯國家、社會(huì )、集體和公民的合法權益;
二、不得發(fā)布國家法律、法規明令禁止的內容;互相尊重,對自己在本站的言論和行為負責;
三、本站對您所發(fā)布內容擁有處置權。