VFP9 中怎么好像不兼容SQL语句呀
一个简单的连接SQL数据库的查询,多加一个字段都会报错,不加就可以,到底是哪儿出问题了呢?
public nhandle nhandle=sqlstringconnect("driver=sql server;server=192.168.1.129;uid=sa;pwd=;database=uf")
if nhandle>0
MESSAGEBOX('连接成功!!!')
sqlexec(nhandle,"select a.cwhcode 库别,a.cinvcode 料号,b.cinvstd 规格,a.cfree1 包装状况,a.cfree2 电源安规,;
a.iquantity 现存量 ,a.iquantity+a.finquantity-a.foutquantity 可用量,b.ccomunitcode 单位;
from currentstock a left join inventory b on b.cinvcode=a.cinvcode where 料号='D0000075' ","INV")
BROWSE
else
if messagebox("数据库连接失败,是否继续连接?",48+4,"连接失败提示")=6 &&回答"是"
return
else
quit
endif
endif