[Tutor] How long can a line be for readline() or readlines() ?? ((LONG)) file, example and console

Schmidt, Allen J. aschmidt@nv.cc.va.us
Fri, 9 Nov 2001 12:28:42 -0500


Each line has actually 6 pipes:
|adnum|logo|adtext|catnum|RM|

The RM on the end is a holdover from when the text was processed a different
way.

Lines under 2k go in without a hitch. The line I sent is one over the 2k
limit.

-----Original Message-----
From: Lloyd Kvam [mailto:lkvam@venix.com]

THIS is your problem area:

  lineout=string.split(lineout,'|')
          sql="insert into current (adnum, logo, rundate, runday, status,
adtext, category) values
('"+lineout[1]+"','"+lineout[2]+"','"+date+"','"+day+"','ENABLED','"+lineout
[3]+"','"+lineout[4]+"')"

lineout becomes a list of lines that is made up of those pieces between 
the |s of the orinal lineout.  The sql statement requires that the 
lineout list contain at least 5 lines.  Thus there needs to be at least 
4 |s in the original lineout.