Chr(34) = """这样也可以: Data1.RecordSource = "select * from ypxx where 商品名称 like """ + Text1.Text + "*" + """最终的字符串是: select * from ypxx where 商品名称 like "Text1内容*"
在sql server2000中,我都用单引号来标记字符串 Data1.RecordSource = "select * from ypxx where 商品名称 like "+"'" + Text1.Text + "*'"
Data1.RecordSource = "select * from ypxx where 商品名称 like """ + Text1.Text + "*" + """最终的字符串是:
select * from ypxx where 商品名称 like "Text1内容*"
Data1.RecordSource = "select * from ypxx where 商品名称 like "+"'" + Text1.Text + "*'"