精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • dim strsql as string

    dim strsql as string
    If Text1.Text "" Then
    Adodc1.Recordset.Close
    If Val(Text1.Text) 0 Then
    strsql = "select * from name where name=" & Trim(Text1.Text) 'Trim去掉前后空格
    Else
    strsql = "select * from name where name='" & Trim(Text1.Text) & "'"
    End If
    Adodc1.CommandType = adCmdText
    Adodc1.Recordset.Open strsql
    Set DataGrid1.DataSource = Adodc1
    Else
    Set DataGrid1.DataSource = Nothing
    End If
    以上查找字母或中文都不會報(bào)錯,但查找的為數(shù)字就會報(bào)錯”標(biāo)準(zhǔn)表達(dá)式中數(shù)據(jù)類型不匹配“
    其他人氣:402 ℃時(shí)間:2020-06-02 17:58:32
    優(yōu)質(zhì)解答
    strsql = "select * from name where name=" & Trim(Text1.Text) 'Trim去掉前后空格你這個(gè)name在數(shù)據(jù)庫中是字符串的所有必須加上單引號.
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版