asp.net中如何创建与数据库的连接类?
asp.net中如何创建与数据库的连接类?以下是用VB编写的.????可是不行...../????/
关键就是在server.mappath("demo.mdb")这个位置不行!!!
Public Function CreateConnDB()
Dim ConnAll As New OleDbConnection
ConnAll.ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + server.mappath("demo.mdb")
ConnAll.Open()
CreateConnDB = ConnAll
End Function