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
相关问答:
xmlDoc1.loadXML(h)总是返回false,为什么?谢谢帮忙回答一下
h是什么呢。。。。。。。。。
h是xml格式的字符串
你是想打开。XML格式的文件吧?
我是把h放在xmlDoc1里,用xmlDoc1.loadXML(h),然后取xmlDo ......
dim a as string,b as string,c as string
a="工程编号,单位工程名称,分部工程编号"
b="单位工程名称"
c="单位"
怎么才能判断出a字符串中存在b字符串,而不存在c字符串
看看i ......
谁能帮我把下面这些代码改成VB形式的,多谢了,急用~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
小弟用VB调EXCEL作图
objExlApp.Workbooks.Add
objExlApp.Charts.Add
objExlApp.ActiveChart.ChartType = xlLine
objExlApp.ActiveChart.HasLegend = True
objExlApp. ......
系统在多台电脑上运行,就在其中一台电脑上产生”内存溢出“。
每台电脑操作系统 配置都一样的。。请问是什么原因?
(1)用了设计不完善的控件,控件本身有问题,或者不恰当地使用了api函数。
(2)无限的 ......