最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 数据库连接程序
时间:2022-07-02 23:09:29 编辑:袖梨 来源:一聚教程网
<%@ LANGUAGE = VBScript CodePage = 936%>
<%
On Error Resume Next
Response.Buffer = True
dim startime
dim conn
dim connstr
dim sqldatabase,sql_pass_word,sql_User_ID,sql_Data_Source
startime=timer()
Set conn = Server.CreateObject("ADODB.Connection")
connstr = "Provider=SQLOLEDB.1;Password='88888547&*($';Persist Security Info=False;User ID='888';Initial Catalog='888';Data Source='888'"
conn.Open connstr
'ConnStr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=(local)"
'conn.Open connstr
'conn.DefaultDatabase = "dgjob"
Sub CreateRS(sql,lv1,lv2)
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,lv1,lv2
End sub
function CloseDb
Conn.close
Set conn = Nothing
End Function
If Err Then
Response.Write "" & vbcrlf
Response.Write "" & vbcrlf
Response.Write "数据库连接出错,请检查连接字串。"'注释,需要把这几个字翻译成英文。
err.Clear
Set Conn = Nothing
Response.End
End If
function rsclose
set rs=nothing
end function
function connclose
conn.close
set conn=nothing
end function
%>
相关文章
- 《绝区零》伊芙琳培养材料汇总 01-24
- 《无限暖暖》1.2春节兑换码一览 01-24
- 《网上国网》查询阶梯档位方法 01-24
- 《蛋仔派对》神游贺岁盲盒获取方法 01-24
- 《炉石传说》星际联动盗贼卡组玩法介绍 01-24
- 皮革珊瑚属于珊瑚中的 01-24