Hi guys...
Can anyone help me to do log file for my apllication?...actually i'm doing console application where it will pull the data from database and insert to another database...i need to have log etheir it working or error..thanks for your help
Hi guys...
Can anyone help me to do log file for my apllication?...actually i'm doing console application where it will pull the data from database and insert to another database...i need to have log etheir it working or error..thanks for your help
For that, you simply need to use the IO classes built into .NET
Imports System.IO
Perform a google search to and look for "VB.NET + Write to text file" or similar and you'll be on your way. There are many good examples and some may suit your requirements more than others... and in most cases you can copy the code from the web page, paste it into your app, modify it and run.
You might also want to consider adding the information to the event viewer built into windows... so, you may also want to extend your search to that technique as well.
Both have advantages and disadvantages.
For that, you simply need to use the IO classes built into .NET
Imports System.IO
Perform a google search to and look for "VB.NET + Write to text file" or similar and you'll be on your way. There are many good examples and some may suit your requirements more than others... and in most cases you can copy the code from the web page, paste it into your app, modify it and run.
You might also want to consider adding the information to the event viewer built into windows... so, you may also want to extend your search to that technique as well.
Both have advantages and disadvantages.
http://www.codeproject.com/KB/vb/ErrorsAndEventsExample.aspx
The codeproject link he provided is a very good example, just look at the StreamWriter class, and you should catch on pretty quick. It is very easy to implement.
Ok,thanks all...i got it n it settel.....ekekekeekekeke
Please search about how to work with log file in .net
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.