最上面的#includefile="../dbcon.asp"-文件内容:setcon=Server.CreateObject("ADODB.Connection")ConnectionString="driver={SQLServer};server=(local);uid=media;pwd=89632;databas...
最上面的#include file="../dbcon.asp" -文件内容:
set con = Server.CreateObject("ADODB.Connection")
ConnectionString = "driver={SQL Server};server=(local);uid=media;pwd=89632;database=WebMedia"
con.ConnectionString = ConnectionString
con.Open
szDBType = "MSSQLSERVER"
下来打开数据库的
if IsObject(con) = false then
Response.Write "未找到数据库连接对象!"
Response.End
end if
if con.State = 0 then
Response.Write "数据库无法打开!"
Response.End
end if
x = GetSysConfigOption()
szSQL = "SELECT dir FROM SkinInfo WHERE sk_id=" & Session("Option_UIStyle")
set rsData = Server.CreateObject("ADODB.Recordset")
rsData.Open szSQL,con,1,3
if not rsData.EOF then
szSkinDir = rsData("dir")
else
szSkinDir = "default"
end if
rsData.Close
szSkinDir = szPath & "oemui/skins/" & szSkinDir & "/"
if Session("Option_PageNum_Admin") < 10 then
iPageAdmin = 10
iPageNews = 10
iPageGame = 10
iPageTool = 10
else
iPageAdmin = Session("Option_PageNum_Admin")
iPageNews = Session("Option_PageNum_News")
iPageGame = Session("Option_PageNum_Game")
iPageTool = Session("Option_PageNum_Tools")
end if
cBnCrLf = Chr(13) & Chr(10)
cMouseOver = "onMouseOver=""this.style.backgroundColor='#CCCCCC';"" onMouseOut=""this.style.backgroundColor='transparent';"""
Response.CharSet = "GB2312"
Response.ContentType = "text/html"
Response.Expires = -1
Response.Buffer = TRUE
想修改数据库中的一个数值,从哪里寻找存放数据库的表?字段?
只用过access,
所以,请大家详细说一下,谢谢!
(以上代码,仅供参考)
展开