vb+sql
在VB中,如何执行下面的SQL语句
Update t_Icitem Set f_102 = IsNull(f_102,0)+1 Where FNumber='0001'
比如:
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,0)+1 Where FNumber='" & text1.text & "'")
关键是Isnull(f_102,0)+ 1这部分如何处理?
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,1) Where FNumber='" & text1.text & "'")
ISNULL
使用指定的替换值替换 NULL。
语法
ISNULL ( check_expression , replacement_value )
参数
check_expression
将被检查是否为 NULL的表达式。check_expression 可以是任何类型的。
replacement_value
在 check_expression 为 NULL时将返回的表达式。replacement_value 必须与 check_expresssion 具有相同的类型。
返回类型
返回与 check_expression 相同的类型。
注释
如果 check_expression 不为 NULL,那么返回该表达式的值;否则返回 replacement_value。
我写错了,不好意思。
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,0)+intJ-1 Where FNumber='" & text1.text & "'")
是变量。
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,1) Where FNumber='" & text1.text & "'")
cn.execute("Update t_Icitem Set f_102 = IsNull(f_102,0)+" & (intJ-1) & " Where FNum
相关问答:
为什么我用form.show和form.hide多次连接了两个窗口只能互换链接两次啊?
代码看看
照道理form.show 没次数限定的吧
我也快疯了。
楼主知道怎么发贴么?
引用
我也快疯了。
楼主知道怎么发贴么?
楼主也 ......
现在有个xml文件是<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xm ......
有两个问题
第一个问题:
网页源码
<td><select name="question" onchange="showcustomquest(this.value)" tabindex="4"><option value="0">无安全问 ......
系统在多台电脑上运行,就在其中一台电脑上产生”内存溢出“。
每台电脑操作系统 配置都一样的。。请问是什么原因?
(1)用了设计不完善的控件,控件本身有问题,或者不恰当地使用了api函数。
(2)无限的 ......