大家帮我看看呗
从数据库里面读取某一字段,如何对其进行计算啊(用ADO访问SQL数据库)如字段WarePosCode
pos101
pos102
pos103
pos104
已经写好的部分程序
pos = rs.Fields("WarePosCode")&""
i = Val(Right$(pos, 3))
If i >= 101 And i <= 150 Then
For i = 101 To 150
x = i \ 5
y = i Mod 5
If x = 20 And y = 1 Then floor = 1: grid = 1
If x = 20 And y = 2 Then floor = 2: grid = 1
If x = 20 And y = 3 Then floor = 3: grid = 1
If x = 20 And y = 4 Then floor = 4: grid = 1
If x = 21 And y = 0 Then floor = 5: grid = 1
是不是对数据进行操作之前要先放到一个数据容器中?