VF提示不能识别的语句或关键字
lnHandle=SQLConnect(lcODBCName,lcDBUser,lcDBPasswd)
If lnHandle>0 &&连接成功
**从库里获得数据)
lnReturn=SQLExec(lnHandle,"SELECT gz_bh,gz_mc,g_zhh,g_yus,AGENT,a.agentid FROM (SELECT g_xxb.gz_bh, gz_xxb.gz_mc, g_zhh, g_yus, agentid FROM g_xxb, gz_xxb WHERE g_xxb.gz_bh=gz_xxb.gz_bh) a LEFT OUTER JOIN VK_AGENT ON a.agentid = VK_AGENT.agentid ORDER BY gz_bh","CursorB")
If lnReturn>0 &&运行成功
*显示
thisform.grid1.recordsource=null
thisform.grid1.recordsource='CursorB'
thisform.grid1.refresh
Else &&失败
&&出错处理
EndIf
Else &&连接失败
MessageBox("连接SQL SERVER失败",16,"BUFFER")
EndIf
红色的为提示部分
[解决办法]
可以分段显示字符
也可以用&命令
[解决办法]
超过255字符,用"select * from aaa"+" where aa=1"+"order by sss"
这样就行了!