Advertisement

04.15.2008 at 06:41AM PDT, ID: 23323637
[x]
Attachment Details

asp mod function

Asked by newbie29 in Active Server Pages (ASP)

Tags: asp

I have a situation where I need to query xml results, fetch specific node value and append it to
the text file, I have most of the script doing this task, however, I have an extra mod condition
which should check if the mod = 0 then append it to the text file.
I am not sure whether I would need this  condition, can someone please explain me the significance
of this in the snippet attached?
thanks for any help
regards
samStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
' Write Field Names in the First Row
	FieldTitle = Replace(Ucase(KeyFields), ",", Separator) & VbCrLf
	x = WriteFile(OutFile, FieldTitle)
	 
	AddCount = 0
	For i = 0 to fc - 1	    
		res.GetNthDoc(i)
		AddCount = AddCount + 1
		If AddCount mod ReportStep = 0 Then
			msg("> records processed: [" & Padz(AddCount, 8) & "]")
			If Right(blob, 1) = VbCrLf Then Blob = Left(blob, len(blob)-1)			
			AppendtoFile OutFile, blob 
			blob = ""
		End If
		fullpath = res.DocDetailItem("_filename")		
		fBlob = ReadFile(fullpath)
		'RefNo = res.DocDetailItem("ref_no")
 
		parts = Split(KeyFields, ",")
		for each p in parts
			val = XMLField(fBlob, p, False)
			FieldLine = FieldLine & val & Separator
		Next
		fBlob = ""
		If Right(FieldLine, 1) = Separator Then FieldLine = Left(FieldLine, Len(FieldLine)-1)
		blob = blob & FieldLine & VbCrLf				
		FieldLine = "": val = ""
		
	Next
[+][-]04.15.2008 at 06:45AM PDT, ID: 21358600

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 10:29AM PDT, ID: 21360739

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2008 at 10:33AM PDT, ID: 21360772

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: asp
Sign Up Now!
Solution Provided By: cedlinx
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628