Function xx()
sql = "update..."
xx = xxx(sql)
sql = "update..."
xx = xxx(sql)
sql = "update..."
xx = xxx(sql)
End Function
Function xxx()
...
End Function这样每条语句都调用一次xxx函数来更新数据表。有没有其他好一点的方式呢?
sql = "update..."
xx = xxx(sql)
sql = "update..."
xx = xxx(sql)
sql = "update..."
xx = xxx(sql)
End Function
Function xxx()
...
End Function这样每条语句都调用一次xxx函数来更新数据表。有没有其他好一点的方式呢?
Function xx()
sql = "update tab1 set aa=1 where xx=2"
xx = xxx(sql)
sql = "update tab2 set bb=1 where yy=2"
xx = xxx(sql)
sql = "update tab3 set cc=1 where ww=2"
xx = xxx(sql)
End Function Function xxx(sql as string) as integer
On Error GoTo errFF2
cnn.Execute strSql
errFF2:
xxx= IIf(Err.Number = 0, 0, -1)
End Function