If isnull(REQUEST("SEQ")) or REQUEST("SEQ")="" Then
'yes, then set sequence as 0 seq_type=0 ELSE 'no, is it number? If isnumeric(REQUEST("SEQ"))THEN 'yes, convert to number seq_type=CLng(REQUEST("SEQ")) ELSE 'no, set 0 seq_type=0 End If End If 'Set procedure name ComObj.CommandText = "_sp_Operation_Codes" 'Set object type as Stored Procedure 'adovbs.inc dosyas?nda adCmdStoredProc bir sabit de?ere e?it=4 ComObj.CommandType = 4 'in adovbs.inc it's constant adCmdStoredProc ComObj("@seq_type")=seq_type 'Create Recordset Instance Set RSetObj = Server.CreateObject("ADODB.RecordSet") 'Forward only recordset - cursor RSetObj.CursorType = 0 'in adovbs.inc it's constant adOpenForwardOnly 'Call procedure and direct results RSetObj.Open ComObj 'If no records found If RSetObj.EOF Then 'Close Recordset RSetObj.Close 'Free memory Set RSetObj=Nothing Set ComObj=Nothing Set ConObj=Nothing End If 'scroll records forward 'while rich last record Do While NOT RSetObj.EOF 'To access fields in recordset U must use RSetObj("field") 'In my procedure I define recordset as SELECT op_code,op_explain 'that's fiels return are op_code and op_explain in order to 'access them U must use RSetObj("op_code"),RSetObj("op_explain") 'Move to next record RSetObj.MoveNext 'continue LOOP 'Close Recordset RSetObj.Close 'Free memory Set RSetObj=Nothing Set ComObj=Nothing Set ConObj=Nothing 'Stop server response Response.End |