上个方法不好,,,,有专门的返回计算值的方法,,,就是这个ExecuteScalar 代码少了不少
Dim strConn, strSQL As String
Dim myConn As OleDbConnection
Dim myCommand As OleDbCommand
dim cont as integer
strsql = "select * from table"
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(".") & "/db1.mdb"
myConn = New OleDbConnection(strConn)
myCommand = New OleDbCommand(strSQL, myConn)
myConn.Open()
cont = myCommand.ExecuteScalar()
myConn.Close()
response.write(CONT)
转载于:https://www.cnblogs.com/aaronlly/archive/2005/07/24/199284.html
1324

被折叠的 条评论
为什么被折叠?



