你是否為自己設計的資料庫感到滿足了呢?你確信就不要對其再處理?比如建立立資料庫表,比如建立或者修改某個欄位……當然這些都屬於設計資料庫之列。
那麼,你正常的操作又是不是下載資料庫到本機,然後開啟之進行修改,接著再上傳上去?十有八九都是如此-_-!
現在,你可以接觸下有關於此的資訊了,畢竟代碼的功能是為手動的操作省了不少時間。不過代碼的產生也還不是手工?呵呵:)
1,建立資料庫檔案cnbruce.mdb(不設計任何錶)
建立資料庫的代碼:
<%
Option Explicit
dim databasename '定義資料庫名稱
databasename="cnbruce.mdb" '資料庫名稱
dim databasepath '定義資料庫存放路徑
databasepath="e:cnbrucedatabase" '資料庫絕對路徑
dim databasever '定義資料庫版本 2000 或者 97
databasever = "2000"
Function Createdfile(FilePath,FileName,Ver)
Dim cnbruce,dbver
select case ver
case "97"
dbver = "3.51"
case "2000"
dbver = "4.0"
end select
if dbver <> "" then
Set cnbruce = Server.CreateObject("ADOX.Catalog")
call cnbruce.Create("Provider=Microsoft.Jet.OLEDB." & dbver & ";Data Source=" & filepath & filename)
end if
End Function
Call Createdfile(databasepath,databasename,databasever) '建立資料庫
%>