#52004/4/8 10:25:57
DreamweaverMX是这样生成的,我看符合你的语法呀?
======================
<%
Dim rsSearchDemo__varName
Dim rsSearchDemo__varID
Dim rsSearchDemo__varTemp
rsSearchDemo__varName = "%"
rsSearchDemo__varID = "0"
rsSearchDemo__varTemp=request.QueryString("tfSearch")
If (rsSearchDemo__varTemp <> "" and IsNumeric(rsSearchDemo_VarTemp)=True) Then
rsSearchDemo__varID =rsSearchDemo__varTemp
rsSearchDemo__varName =rsSearchDemo__varTemp
ElseIf(rsSearchDemo__varTemp <> "")then
rsSearchDemo__varName =rsSearchDemo__varTemp
End if
%>
<%
Dim rsSearchDemo
Dim rsSearchDemo_numRows
Set rsSearchDemo = Server.CreateObject("ADODB.Recordset")
rsSearchDemo.ActiveConnection = MM_SearchDemo_STRING
rsSearchDemo.Source = "SELECT a.ID,a.NAME,a.RANK,a.DEPT,a.GENDER,a.TELE,b.SALARY, b.CHANGE FROM PersonalInfo a,SalaryInfo b WHERE a.ID=b.ID AND a.NAME=b.NAME AND (a.ID=" + Replace(rsSearchDemo__varID, "'", "''") + " OR a.NAME like '%" + Replace(rsSearchDemo__varName, "'", "''") + "%') ORDER BY a.ID"
rsSearchDemo.CursorType = 0
rsSearchDemo.CursorLocation = 2
rsSearchDemo.LockType = 1
rsSearchDemo.Open()
rsSearchDemo_numRows = 0
%>
==============
可是有错,如何修正呢?