你应该这样写
adodataset1.commandtext='sellect 商品名称 from spmc where 商品类型='+''''+'音箱' +'''';
adodataset1.commandtext='sellect 商品名称 from spmc where 商品类型='+''''+'音箱' +'''';
解决方案 »
- win7(64位)+delphi6+SQL2000連接數量庫出錯!
- 用ADO和SQL数据库连接几种现象
- 怎么样调用Dll中的子窗体
- 在线程中通过ADO对数据库进行操作时,出现错误,提出为:在异步运行时,操作不能被执行
- 如何设置 dxDBGrid 使能用鼠标拖动多选记录行?
- 如何能够获得子线程的错误信息
- 来者给分,,高手指点!!
- 1)双击stringgrid最上面一行fixedrows的分隔线时触发什么事件?2)单击stringgrid最上面一行fixedrows的Cells时触发什么事件?在线等待!
- 大家讨论,Web编程,用哪种语言最好!!!
- 高分求解(Richedit的小问题)
- 请问一下如何使一个FORM停留在所有应用程序的最前端
- !!!ping 后如何得到结果?即如何才能知道是否能通(程序实现)!
ADodataset1.CommandText :='select 商品名称 from spmc where 商品类型 =''' + '音箱' + '''
这个所有的sql中都是通用的
避免混
ADodataset1.CommandText :='select 商品名称 from spmc where 商品类型 = '+#39+'音箱'+#39;