不懂 ASP 数据库连接问题
<%' 创建数据库连接
Function GetConn(Connstr)
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Connstr
Set GetConn = Conn
End Function
' 创建SqlServer数据库连接
Function GetSQLServerConn(DBServer,UserID,Password,DataBase)
Dim Params,Conn
Set GetSQLServerConn = Nothing
Params = "Driver={SQL Server}"
Params = Params & ";Database=" & DataBase
Params = Params & ";Server=" & DBServer
Params = Params & ";Uid=" & UserID
Params = Params & ";Pwd=" & Password
Set GetSQLServerConn = GetConn (Params)
End Function
' 获得RecordSet
Function GetRecordSet (Sql)
'response.write sql
'response.end
rs.Open Sql,Conn,1,1
Set GetRecordSet = rs
End Function
' 生成SQL Server连接
Set Conn = GetSQLServerConn("(local)","sa","","ww")
Set rs = Server.CreateObject("ADODB.Recordset")
---------------------------------------------------------
上面是源码 如果我 SQL 的账户是 sa 密码是ww 数据库路径 "../数据库/数据库.bak"
我改修改什么地方能
希望师傅赐教 QQ:307651871