Ok here's what's going on. I'm reading in some log files to input into an access database. Yes i know access but still it's a temporary storage area so i can print reports and then delete all this information. These log files come from imail and looks like this
client, -, -, N, 05/04/2005, 00:00:43, 1, -, -, 203.135.3.142, 203.135.3.142, 80, 101, 240, 265, http, -, POST, http://203.135.3.142:80/scripts/open.dll?, -, Unknown, 200
Now what i'm doing is reading in like 5 records from this monster of a line I crab t he client skip the next 4 commas, i grab the date, time , scip 4 commas and i grab the Destination name (ip address or name) and then I grab the destination IP. you might notice both are ip addresses. THis is because it couldn't resolve the destination name so just uses the ip.
Everytime I encounter a comma i increment my intCommas. So i know which field i'm at etc...
Ready for the problem? For some stupid reason I can't open up the bloody file. I know the string is receiving data. The string I try to open the file w/ has
c:\WINDOWS\Desktop\Projects\Log Importer2005-05-01-WinProxy_Access.log
this path is correct.
This is the open statement:
Open filename For Random As #1 Len = 1
I try to read in 1 byte at a time and do w/ the character as I need. This is where i'm stuck. I'll post the rest of the code in my next post. Anyone have any ideas or do you need additional info?
client, -, -, N, 05/04/2005, 00:00:43, 1, -, -, 203.135.3.142, 203.135.3.142, 80, 101, 240, 265, http, -, POST, http://203.135.3.142:80/scripts/open.dll?, -, Unknown, 200
Now what i'm doing is reading in like 5 records from this monster of a line I crab t he client skip the next 4 commas, i grab the date, time , scip 4 commas and i grab the Destination name (ip address or name) and then I grab the destination IP. you might notice both are ip addresses. THis is because it couldn't resolve the destination name so just uses the ip.
Everytime I encounter a comma i increment my intCommas. So i know which field i'm at etc...
Ready for the problem? For some stupid reason I can't open up the bloody file. I know the string is receiving data. The string I try to open the file w/ has
c:\WINDOWS\Desktop\Projects\Log Importer2005-05-01-WinProxy_Access.log
this path is correct.
This is the open statement:
Open filename For Random As #1 Len = 1
I try to read in 1 byte at a time and do w/ the character as I need. This is where i'm stuck. I'll post the rest of the code in my next post. Anyone have any ideas or do you need additional info?