'as'运算符后缺少操作数 [英] Missing operand after 'as' operator

查看:104
本文介绍了'as'运算符后缺少操作数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是代码:



bindsrc.Filter =stud_id as Student_Num like''&TextBox1.Text&%''

this is the code:

bindsrc.Filter = "stud_id as Student_Num like ''" & TextBox1.Text & "%''"

推荐答案

删除''作为Student_Num'',这不是必需的。在执行select语句而不是where子句时,您只能使用''作为Student_Num''。如果您绑定了一个使用''stud_id作为Student_Num'的选择,那么将您的代码行更改为



bindsrc.Filter =Student_Num like''& TextBox1.Text&%''
remove the ''as Student_Num'', it isn''t required. You would only use ''as Student_Num'' when doing a select statement and not for the where clause. If you have binding a select that used the ''stud_id as Student_Num'' then change your line of code to

bindsrc.Filter = "Student_Num like ''" & TextBox1.Text & "%''"


这篇关于'as'运算符后缺少操作数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆