Set Conn=server.createobject ("Adodb.connection")
Connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" &server.mappath ("/www.111cn.net/data.mdb")
Conn.Open ConnStr
%>
<%
Response.Buffer = True
Const msxmlversion= ". 3.0"
Const COOKIENAME = "Netpic"
Dim conn,connstr,datafile
Startime = Timer ()
' Modifiable settings One: ======================== defines a database category, 1 is a SQL database, and 0 is an Access database =============================
Const ISSQLDATABASE = 0
'============================================================================================================== ==
If issqldatabase = 1 Then
' must modify settings two: ========================sql Database Settings =============================================================
' SQL database connection parameters: Connection name (Sqllocalname) (Local locally, field IP), user name (sqlusername), user password (sqlpassword), database name (sqldatabasename)
Const SQLLOCALNAME = "(local)"
Const SQLUSERNAME = "SA"
Const SQLPASSWORD = "001225"
Const SQLDATABASENAME = "Photo"
'============================================================================================================== ==
datestring = Array ("GETDATE ()", "yyyy", "M", "D", "hh", "N", "s", "'")
ConnStr = "Driver={sql server};uid=" & sqlusername & ";p wd=" & SQLPassword & ";d atabase=" & Sqldatabas Ename & "server=" & Sqllocalname & ";
Else
' must modify settings three: ========================access Database Settings ==========================================================
DataFile = Server.MapPath ("data/#photo. mdb")
'============================================================================================================== ==
datestring = Array ("Now", "' yyyy '", "' m '", "' d '", "' H '", "' N '", "' s '", "#")
ConnStr = "Provider = Microsoft.jet.oledb.4.0;data Source =" & DataFile
End If
' On Error Resume Next
Set conn = Server.CreateObject ("Adodb.connection")
Conn.Open ConnStr
If Err Then
Err.Clear
Set conn = Nothing
Response.Write "Database connection error, please check the connection string. "
Response.End
End If
function checked (value1,value2)
Checked = "value=" &CHR (&VALUE2&CHR) (34)
If LCase (value1& "") =lcase (value2& "") then checked = checked & "Checked"
End Function
function selected (value1,value2)
Selected = "Value=" &CHR (&VALUE2&CHR) (34)
If LCase (value1& "") =lcase (value2& "") then selected = Selected & "Selected"
End Function
%>