Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    1

    Unanswered: Need help with parsing a DB field into an Array

    I have been successful in getting all of my network device syslog messages to post to a MS Access DB. This makes it nice and neat to run sql queries on things such as date, IP host,etc. from a web front end. Unfortuately, the field in the table that holds the "offending" source IP address is in the body of a text message field. I would like to parse out just the IP address strings in this field in the database and count how many times each unique IP address appears. This would give me a nice quick way to determine that any one particular IP address is trying to hack my network for an excessive amount of attempts. Since I can't seem to get this to work through sql, because the query always returns the entire field. Does anyone know a way to get this done using VB?

  2. #2
    Join Date
    Mar 2003
    Location
    Atlanta, GA
    Posts
    191

    Re: Need help with parsing a DB field into an Array

    Originally posted by rodrigj
    I have been successful in getting all of my network device syslog messages to post to a MS Access DB. This makes it nice and neat to run sql queries on things such as date, IP host,etc. from a web front end. Unfortuately, the field in the table that holds the "offending" source IP address is in the body of a text message field. I would like to parse out just the IP address strings in this field in the database and count how many times each unique IP address appears. This would give me a nice quick way to determine that any one particular IP address is trying to hack my network for an excessive amount of attempts. Since I can't seem to get this to work through sql, because the query always returns the entire field. Does anyone know a way to get this done using VB?
    My suggestion would be to use a regular expression to search through and find any text matching a pattern for an IP address. With a regular expression you could easily find the IP, and count occurrances. Regular expressions are easy to learn, but difficult to master. You can use them in an ASP page via VBscript code. Take a look on the Microsoft site knowledgebase to get more info on regular expressions. Or, have a look at the VBScript documentation.
    Tim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •