当前位置: 代码迷 >> Delphi >> ComboBox中值的选择有关问题
  详细解决方案

ComboBox中值的选择有关问题

热度:2514   发布时间:2013-02-25 00:00:00.0
ComboBox中值的选择问题
我要选择一个COMBOBOX中的值 ,然后根据这个值来查询相应的数据库中表中的值,请问下应该怎么写这个查询代码?
   
   
 

------解决方案--------------------------------------------------------
下面的语句怎么样?
Select * from TableName where Field1=QuotedStr(combobox1.text)
------解决方案--------------------------------------------------------
sql = 'Select * from TableName where Field1="' + combobox1.text + '"'
  相关解决方案