- 在线时间
- 5407 小时
- 专家
- 0
- UID
- 225033
- 注册时间
- 2005-12-10
- 帖子
- 6222
- 精华
- 0
- 积分
- 12139
- 居住地
- 四川省 成都市
- 离线
- 0 天
专长: ASP ,Access
- 帖子
- 6222
- 体力
- 12069
- 威望
- 14
- 居住地
- 四川省 成都市
|
发表于 2008-5-24 18:17:16
|显示全部楼层
- <%
- Dim sDataName,oFso, oCat
- sDataName = "data/mdb.mdb"
- Set oFso = Server.CreateObject("Scripting.FileSystemObject")
- If Not oFso.FileExists(Server.MapPath(sDataName)) Then '检查数据库是否存在
- '创建数据库文件
- Set oCat = Server.CreateObject("ADOX.Catalog")
- oCat.Create "Provider=Microsoft.Jet.Oledb.4.0;Data Source=" & Server.MapPath(sDataName)
- Set oCat = Nothing
- Response.Write "创建成功!"
- Else
- Response.Write "已经存在!"
- End If
- Set oFso = Nothing
- %>
复制代码 |
|