Private Sub Command1_Click()
On Error GoTo ErrHandle
myRecord.Open "view1", myconn, adOpenKeyset, adLockOptimistic
Adodc1.RecordSource = "select 原型,读音,词性,级别.解释 from view1 where 原型 ='" & RichTextBox1.Text & "'"
Adodc1.Refresh
ErrHandle:
Exit Sub
为什么运行时说 [SQL SERVER]'text1'列名无效 ?????? 高手们帮帮忙呀~~~
On Error GoTo ErrHandle
myRecord.Open "view1", myconn, adOpenKeyset, adLockOptimistic
Adodc1.RecordSource = "select 原型,读音,词性,级别.解释 from view1 where 原型 ='" & RichTextBox1.Text & "'"
Adodc1.Refresh
ErrHandle:
Exit Sub
为什么运行时说 [SQL SERVER]'text1'列名无效 ?????? 高手们帮帮忙呀~~~
另外,ADODC1属性的连接字符串设错了,检查一下
***************************************************************************
改为
Adodc1.RecordSource = "select 原型,读音,词性,级别,解释 from view1 where 原型 ='" & RichTextBox1.Text & "'" 看到差别了吗?
select [原型],[读音],[词性],[级别.解释] from view1 where 原型
***************************************************************************
改为
Adodc1.RecordSource = "select 原型,读音,词性,级别,解释 from view1 where 原型 ='" & RichTextBox1.Text & "'" 这样看到差别了吧?