RecordSet, Checking the Last Record

unlitebelt

New Member
I am using the google chart framework based on a data in database...I need to generate an output like:\[code\]([ ['Year', 'ON', 'OFF', 'X1', 'X2'], ['Jan/12', 2, 5, 10, 9], ['Fev/12', 5, 10, 54, 10], ['Mar/12', 10, 36, 15, 10]]);\[/code\]Note that the last line do not have a comma. My code looks like:\[code\]([ ['Year', 'ON', 'OF', 'X1', 'X1'], <% WHILE NOT DB.EOF ON= DB("ON") OFF= DB("OFF") X1= DB("X1") X2= DB("X2") %> ['<% Response.Write Month %>/<% Response.Write Year %>', <% Response.Write ON %>, <% Response.Write OFF %>, <% Response.Write X1 %>, <% Response.Write X2 %>, <% DB.MOVENEXT WEND %>]);\[/code\]My question: How can I check when the loop come to the last line, instead of put the comma, put just nothing?Thanks!
 
Back
Top