以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  有语法错误?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=95767)

--  作者:huhu
--  发布时间:2017/2/4 17:51:00
--  有语法错误?
Dim adapter As New SqlClient.SqlDataAdapter("sel ect * from [可用数量表] where 生产订单号码 = \'" & scddhm & "\' and 工单行号 = \'" & gdhh & "\' and 物料编码 = \'" & wlbm & "\' and 库位类别 = \'" & kwlb & "\' and 入库时间 >= #" & startdate & "#  and 入库时间 <= #" & enddate & "# ", cn)

红色的有语法错误?

--  作者:有点色
--  发布时间:2017/2/4 17:56:00
--  
sqlserver数据库的话,要把#改成\'