我用了SQL数据库,在VB里定义了两个integer型函数,比如说:
Dim a As Integer
Dim b As Integer
a=combo1.text
if a>1 then
b=1
else
b=Asc(vbNullChar)
当a大于1时,b向SQL的表里插入1;当a小于等于1时,b向SQL的表里插入空值;a的值来源于一个combobox!
可我插入进去的时候,为什么空值在表里不是NULL,而0呢!
请各位帮帮忙!
Dim a As Integer
Dim b As Integer
a=combo1.text
if a>1 then
b=1
else
b=Asc(vbNullChar)
当a大于1时,b向SQL的表里插入1;当a小于等于1时,b向SQL的表里插入空值;a的值来源于一个combobox!
可我插入进去的时候,为什么空值在表里不是NULL,而0呢!
请各位帮帮忙!
我对SQL不熟,不知道可不可以这样做:判断b的值,当b=0时,插入"NULL",否则插入1。