skibascott
IS-IT--Management
How can I verify if my recordset contains any records?
As of now the code functions fine when the SQL statement finds matches in the database. But, when there are no matches I get an error when I try to read the recordset into an array.
As of now the code functions fine when the SQL statement finds matches in the database. But, when there are no matches I get an error when I try to read the recordset into an array.
Code:
<%
PatternNum = Request.Form("Pat")
SheetNum = Request.Form("Sheet")
Operation = Request.Form("Oper")
CurrentRev = Request.Form("Rev")
CurrentRevDate = Request.Form("RevDate")
Tool = Request.Form("Tool")
OpReq = Request.Form("OpReq")
SQL = "SELECT watchnumber,docnumber FROM WatchDocLink WHERE docnumber = '" & SheetNum & "'"
Set RecSet = Server.CreateObject ("ADODB.Recordset")
RecSet.Open SQL, Connection, adOpenStatic, adLockReadOnly, adCmdText
AssDocs_Array = RecSet.GetRows()
RecSet.Close
Set RecSet = Nothing
%>