Re: Further eDBI Problems
- Posted by RogerL Jan 02, 2010
- 1337 views
sorry the code I posted lost its formatting - I'll try again :-
Loop through data and print each line edbi:dbr_handle dbr = edbi:query("select * from MembershipTypes") object o o = edbi:next(dbr) while sequence(o) do if linecount >= 40 then linecount = 0 puts(fileHandle,"</TABLE></DIV>\n") puts(fileHandle,"<DIV><TABLE><CAPTION><H2>Membership Types</H2></CAPTION>\n") puts(fileHandle,"<TR><TH ALIGN=LEFT>Type</TH><TH ALIGN=RIGHT>Dues</TH></TR>\n") end if printf(fileHandle,"<TR><TD WIDTH=200>%-15s</TD><TD>$%6.2f\n</TD></TR>", {text:format(o[1]),o[2]}) linecount = linecount + 1 o = edbi:next(dbr) end while edbi:closeq(dbr)