环境,win2000,sql2000,delphi 5.0,前台是用缓存方式更新数据库的 前台执行的语句
update OpnBalane
set
FiscaYear = '2002',
AccoPerod = 4,
WrhsCode = '02',
LocCode = '0202',
ItemCode = '57-1217**05',
OpnBalane = 134.0,
OnhandQty = 164.0,
IssueQty = 0.0,
RecivQty = 30.0,
AdjustQty = 0.0,
OpnBalanF = 0.0,
OnhandFud = 0.0,
IssueFud = 0.0,
RecivFud = 0.0,
AdjustFud = 0.0,
AvailQty = 164.0,
Operator = 'pdj',
LotNUmber = NULL,
Attribute = NULL
where
AccoPerod = 4 and
WrhsCode = '02' and
LocCode = '0202' and
ItemCode = '57-1217**05' and
Attribute = NULL能够修改数据库值,而相同的语句在SQL分析器却不能更新数据。
原因主要在 ‘Attribute = NULL’条件中,只是为什么delphi中没错???看不明白了。
update OpnBalane
set
FiscaYear = '2002',
AccoPerod = 4,
WrhsCode = '02',
LocCode = '0202',
ItemCode = '57-1217**05',
OpnBalane = 134.0,
OnhandQty = 164.0,
IssueQty = 0.0,
RecivQty = 30.0,
AdjustQty = 0.0,
OpnBalanF = 0.0,
OnhandFud = 0.0,
IssueFud = 0.0,
RecivFud = 0.0,
AdjustFud = 0.0,
AvailQty = 164.0,
Operator = 'pdj',
LotNUmber = NULL,
Attribute = NULL
where
AccoPerod = 4 and
WrhsCode = '02' and
LocCode = '0202' and
ItemCode = '57-1217**05' and
Attribute = NULL能够修改数据库值,而相同的语句在SQL分析器却不能更新数据。
原因主要在 ‘Attribute = NULL’条件中,只是为什么delphi中没错???看不明白了。
在后台的Where后的语句要用 Attribute is Null这是sql Server的问题与delphi无关。