急啊

解决方案 »

  1.   

    select * from 表名 where 姓名='"& text1 &"'
      

  2.   

    select * from 表名 where  条件
    楼主能否提问时说清楚点?
      

  3.   

    也就说,前台用了几个TEXT控件,后台SQL语句我也知道,只是这中间
    这个查询机制,不懂啊,不知道怎样去做,摸不到头绪,
      

  4.   


    就象这样,根据文本框txtLoginName的内容,
    查询LoginName 字段为文本框txtLoginName的数据显示在表格中
    rs.CursorLocation = adUseClient
    rs.Open "select * from Manger where LoginName='" & txtLoginName.text & "'", cn, adOpenDynamic, adLockBatchOptimisticSet DataGrid1.DataSource = rs
      

  5.   

    dim tmp_text as string
    if trim(tex1.text)="" then
        tmp_text=""
    else
       tmp_text=" and 姓名='"& trim(text1.text) &"'"
    end ifselect * from tablename where 1=1 & tmp_text
      

  6.   

    dim str1 as string
    str1 = text1.text
    '加入联接数据库或其他连接代码
    select * from 表名 where 字段like '% "& str1 &" %''加入显示输出代码'成功系数较高
      

  7.   

    对呀,直接写到SQL语句里就行了