求助关于ASP数据库连接 ,以及函数Function OpenConnect()求讲解!

'*********************************************************
' 目的: 数据库连接
'*********************************************************
Function OpenConnect()

ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open ConnStr

OpenConnect=True

End Function
'*********************************************************

请问这是连接什么数据库的啊?怎么看不出来呢?

喵喔喔
浏览 205回答 2
2回答

慕妹3146593

ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"Set objConn = Server.CreateObject("ADODB.Connection")objConn.Open ConnStrProvider = Sqloledb;区别是什么数据库看这里,Provider =后面就是数据库类型这个是SQL Server 的,

慕码人8056858

用OLE DB连接SQL Server
打开App,查看更多内容
随时随地看视频慕课网APP