查询问题

wang131425 wang131425 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
string s2,d1,e2,e1,c,s1
s1=trim(sle_1.text)
s2=trim(sle_2.text)
d1=trim(ddlb_1.text)
e1 = trim(em_1.text)
e2 = trim(em_2.text)
if cbx_1.checked = false then
if s1 = '' and s2 = '' and d1 = '' then
messagebox('错误',"查询条件不能为空!")
return
else
if s1="" then s1 = '%'
if d1="" then d1 = '%'
if s2="" then s2 = '%'
dw_1.settransobject(sqlca)
c="select * from 商品信息 where 商品编号 like '"+s1+"' and 商品名称 like '"+s2+"' and 商品类型 like '"+d1+"'"
dw_1.setsqlselect(c)
dw_1.retrieve()
end if
else
if s1="" then s1 = '%'
if d1="" then d1 = '%'
if s2="" then s2 = '%'
dw_1.settransobject(sqlca)
c="select * from 商品信息 where 商品编号 like '"+s1+"' and 商品名称 like '"+s2+"' and 商品类型 like '"+d1+"' and 入库日期 > '"+e1+"' and 入库日期 < '"+e2+"'"
dw_1.setsqlselect(c)
dw_1.retrieve()
end if
integer al
al=dw_1.rowcount()
if al =0 then
messagebox('消息',"无符合条件的数据!")
else
st_9.text=string(al)
end if
dw_1.object.datawindow.readonly = "yes"
以上是我查询中的代码。保存时是没有任何问题的。但运行的时候提示:
select error:coiumn lists do not match
我看了一下,表里面的列是对得上的,我用的是ASA的数据库。大家帮忙看看是哪里的问题。先谢过了。
...全文

相关推荐

评论 8
收藏 已收藏
分享
返回顶部
wang131425
PowerBuilder 1,111 成员 66,454 内容