错误:语法错误(操作符丢失在'起点="起点"and'终点='终点'),请问怎么回事?错在哪里?
a: If txtqidian.Text = "" Then txtqidian.Text = "起点"
If txtzhongdian.Text = "" Then txtzhongdian.Text = "终点"
qidian = txtqidian.Text
zhongdian = txtzhongdian.Text
sql_qidian = "起点='" & qidian & "' and "
sql_zhongdian = "终点='" & zhongdian & "'"
If qidian = "起点" Then qidian = ""
If zhongdian = "终点" Then zhongdian = "'"
sql_chaxun = "select * from gongjiaoluxian where " & sql_qidian & sql_zhongdian & "order by 时间权重"
Adodc1.RecordSource = sql_chaxun
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Adodc1.Refresh
txtcount.Text = DataGrid1.ApproxCount
Exit Sub