查询的问题
小弟遍了一段查询的语句,可运行后没有结果,请高手指正tempstr=ALLTRIM(thisform.Text值.Value)
tempstr="%"+tempstr+"%"
MESSAGEBOX(tempstr)
IF thisform.Combo1.Text="电话所属单位"
SELECT _A.电话号码,_A.单位,_A.位置,_A.用户类型,_A.E,_A.F,_A.G,_A.H,_A.I,_A.J,_A.K,_A.L,;
_A.M,_A.N;
FROM "C:\DOCUMENTS AND SETTINGS\PURPLE84\MY DOCUMENTS\VISUAL FOXPRO 项目\A.DBF" _A;
WHERE _A.单位 LIKE tempstr;
INTO CURSOR tempcursor
thisform.Grid1.RecordSource=tempcursor
thisform.Refresh
ENDIF
IF thisform.Combo1.Text="电话所在位置"
SELECT _A.电话号码,_A.单位,_A.位置,_A.用户类型,_A.E,_A.F,_A.G,_A.H,_A.I,_A.J,_A.K,_A.L,;
_A.M,_A.N;
FROM "C:\DOCUMENTS AND SETTINGS\PURPLE84\MY DOCUMENTS\VISUAL FOXPRO 项目\A.DBF" _A;
WHERE _A.位置 LIKE tempstr;
INTO CURSOR tempcursor
thisform.Grid1.RecordSource=tempcursor
thisform.Refresh
ENDIF
IF thisform.Combo1.Text="电话所在分线箱"
SELECT _A.电话号码,_A.单位,_A.位置,_A.用户类型,_A.E,_A.F,_A.G,_A.H,_A.I,_A.J,_A.K,_A.L,;
_A.M,_A.N;
FROM "C:\DOCUMENTS AND SETTINGS\PURPLE84\MY DOCUMENTS\VISUAL FOXPRO 项目\A.DBF" _A;
WHERE _A.H LIKE tempstr;
INTO CURSOR tempcursor
thisform.Grid1.RecordSource=tempcursor
thisform.Refresh
ENDIF