First of all we can't really do any of the code for you since we have a site policy that states you must show your "best effort" attempt at solving the problem yourself. So it might be wise to grab a book and start from the beginning in programming and get to the point where you can write some code that we can help you with.
However what you are talking about is not overly complex and a great resource on here to help you with what you need to do is a tutorial by born2code which talks about sequential file reading.
Visual Basic Tutorials - File Handling in Visual basic 6 Part 1You would read in the log file and for each line of the file you read, you would search the words you need. If you find the word on that line, you can extract the content using string functions like Mid, Left, Right and find where to start with Instr().
So a mix of looping through the file, detecting if the words are there using InStr and then using your string functions will help you pull out the content.
As for linking to a database, that is a whole other issue you probably should wait on until you get the file reading and extraction part completed. You will also have code for us to look at and then we can help you further.
Good luck and hope to see you back here soon with the code example.