lcOldAlias=alias() &&保存当前工作区
lcSqlString= "select * from mpcwlcsb where (approval=0 or availability=1) and id = ' "+allt(thisform.t4.value)+ " ' "
if sqlexec(phandle,lcSqlString, "Tmpbjcgrec ")=-1
=messagebox(MSG_CONNECT_ERROR,48,MB_CAPTION)
Select &lcOldAlias
return .f.
ENDIF
select Tmpbjcgrec
if RECCOUNT( )> 0
=messagebox( "此物料对应的供应商已失效! ",48,mb_caption)
return .f.
endif
Select Tmpbjcgrec
Use
sele (iif(empty(lcoldalias),0,lcoldalias))
thisform.lockscreen=.t.
thisform.refresh
thisform.lockscreen=.f.
提示找不到表Tmpbjcgrec.
------解决方案--------------------------------------------------------
哪一句?
如没有找到,应该是SQLSEXEC执行失败。
------解决方案--------------------------------------------------------
sele (iif(empty(lcoldalias),0,lcoldalias))
改为
sele (iif(used(lcOldAlias),lcoldalias,0))