Hi jmss66, thank's for your replay....
When the Data are exist all the data show, but when the Data aren't exists I got Error Message:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
As for SQL statement it's work with or without semi-colon.
I have been playing around with my code and I make some changes....
<%
rsData.Open "Select * From Data Where EmployeeID =" & intID & "", Conn
If rsData.RecordCount >= 1 then
Response.Write ("Data Was Found")
strsql = "Select * From Data Where EmployeeID ='" & intID & "'"
rsData.Open strsql, Conn
rsData.MoveFirst
elseIf rsData.RecordCount <= 0 then
Response.Write "No Data Was Found"
'Response.Redirect ("SearchUpdate.asp")
end if
%>
with this code I got different problem...
1. If the Data doesn't exists it still goto the 2nd form
but there is no table only buttons and title are shown.
2. If the Data are exists the data Will show in 2nd form(ResultUpdate.asp),
but the Response.Write ("No Data was Found") still show.
Did I make any sense? I hope I didn't confuse you.
thank's
|