求助有关运算问题
诸位好!过去我在VB中编过能运算的小程序,是计算某一时间段、数据表中某一项的和的并填入某一文本框中,但现在应用到网页中就不知道如何修改才能运行,所以请大家帮忙看看修改成asp中运行的程序。谢谢!如下:
grdLoupan.Clear
sql = "select * from 炉料 where 日期 between #" & _
DTPicker1.Value & "# and #" & DTPicker2.Value & "# order by 日期 desc"
rs_luliao.CursorLocation = adUseClient
rs_luliao.open sql, conn, adOpenKeyset, adLockPessimistic
If Not rs_luliao.EOF Then
setgrid
setgridhead
displaygrid
sum = 0
rs_luliao.MoveFirst
While Not rs_luliao.EOF
sum = sum + Val(rs_luliao.Fields(2).Value) '用量汇总
rs_luliao.MoveNext
Wend
Text1.Text = sum