




























上个方法不好,,,,有专门的返回计算值的方法,,,就是这个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)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。