How would I go about reading the last line of a text file - in PHP you can read each line of a text file into an array and then take the last element of that array to be the last line, can you do the same thing with ASP?
<%<BR>Set FSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Set inFile = FSO.OpenTextFile( Server.MapPath(...filename...) )<BR>lines = Split( inFile.ReadAll, vbNewLine )<BR>lastLine = lines( UBound(lines) )<BR>%><BR><BR>Of course, that's a pretty slow thing to do. If at all possible, you ought to avoid doing it. Probably should be using a DB, instead.<BR><BR>
Even ISPs that don't allow "true" DBs will typically allow .csv files and dBase files to slip through. And either of those can be accessed from ADO the same way as a true DB, for all intents and purposes. Is this ISP by any chance running ChiliSoft ASP on Linux boxes? (You can find out by using the VBScript Version functions.) If so, then I'd bet you could get away with dBase files, using a DSN-less connection. I doubt that the ISP is smart enough to know how to disable ADO completely with C!S ASP.<BR><BR>
I'm using a CSV file anyway as it's easy for the client to import into excel. I'm not really dealing with enough data to warrant using a db anyway - but this technique does sound like it could be useful for the future! Cheers!