Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having programmer brain cramps....DON'T LAUGH! .. LOL 2

Status
Not open for further replies.

FBM357

MIS
Jun 2, 2003
77
US
Okay, here's my otherwise 'simple' problem. I would like to incorporate a log file with my Access application. Basically recording user changes (i.e. add and edits). I've already thought of creating a unique filenames (i.e. log04130.txt) and to top it off, I'd like to be able to append to that file (if it exists) whenever the user returns to the program. The file is officially closed once the day has changed. Is this an easy task? Would it be better to record the mods to a table and then dump to a text file? I was thinking the table idea would be better thus allowing the user to query dates for the creation.

Okay, time for another snooze! Brain cramps starting again....

"If you want SQUARE work, you DON'T cut CORNERS!!!" ... :)
 
Either would work. I would lean toward a table solution just to keep everything encapsulated, but either solution is feasible with roughly the same effort, IMO.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
I agree with Tom. The issue with a text file used for logging security is that after a while, it becomes unweilding -- too large, hard to turn that data into information.

Using a table solution gives you more flexibility...
- Easily port to a text file if this is what you want
- Use realtional design to view trends, usage
- Port to Excel for more analyical analysis
- You can even use an event to trigger an alert - something more challenging if you use a raw text file.

Richard
 
Thanks guys! I was leaning towards using a table (seems more flexible). Both of the replies actually make this decision a "no brainer" so to speak. [thumbsup2]

Thanks!

"If you want SQUARE work, you DON'T cut CORNERS!!!" ... :)
 
Michael
we cant see the FAQ you supplied there is an error on it

Hope this helps
Hymn
 
I would highly recomment that you use a table for you log because of the buffering that occurs with text files. If you app dies, you may find that the last 3-4 lines of the your text log were never written to disk, and they are probably the most important lines at that time.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
You may want to consider file size - and include some automated method of lopping off the oldest entries periodically.

Or, of course, migrate to SQL where log files are mandatory.



HTH,
Bob [morning]
 
Brain "cramps" (or just flatulence) here as well


try faq181-291





MichaelRed
mlred@verizon.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top