dim strsql as string
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/21 08:34:02
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
以上查找字母或中文都不会报错,但查找的为数字就会报错”标准表达式中数据类型不匹配“
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
以上查找字母或中文都不会报错,但查找的为数字就会报错”标准表达式中数据类型不匹配“
strsql = "select * from name where name=" & Trim(Text1.Text) 'Trim去掉前后空格你这个name在数据库中是字符串的所有必须加上单引号.
dim strsql as string
英语翻译Dim a() As String,b() As String,x1() As String,y1() As S
dim str as string*10,str="123",len(str)返回值为10,为什么?string*10是
Dim A(1 To 6,6) As String定义的数组包含的元素个数是( ).
在Visual Basic中,语句Dim a(1 To 10) As String所定义的数组元素个数是 (A) 1 (
VB中的Dim sum As Integer语句
dim flag as boolean什么意思
dim a(3,2) as integer
模块:type sell name as string*10 standard as string*20 price a
vb语句翻译在线等im strsql As StringOn Error GoTo ErrMsg '判断数据的正确性 I
计算机语言里面dim a as integer 这句话的dim是哪个英语单词?
Dim a(9) As Integer,x As Integer,k As Integer,I As Integer R