Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2002
    Posts
    4

    Post Unanswered: Running a command

    What is the best way to have Access grab information from a command in the command prompt and populate that answer in to the database. For example, you run 'nslookup' (the data used is contained in the database and needs to be passed on to run the commad) and then use the data that was returned to populate a field in the database?

    Any help or suggestions would be appreciated.
    Last edited by willd; 05-14-02 at 14:26.

  2. #2
    Join Date
    May 2002
    Location
    Atlanta, GA
    Posts
    117
    hey willd,

    I think I can help you. I created a Frame Relay database and wanted to be able to ping addresses from the database with the click of a button so that the user would not have to use the command prompt everytime. It was a real pain in the ass and took forever to come up with a good solution, because not only did I want to be able to ping but I also wanted to be able to run other commands and save them for future use. (ex: Dir, Net Use, Etc...)

    Well this is the best procedure that I could come up with:

    1) creates a temporary text file
    2) the command runs and saves the data in that file
    3) the database imports the data into a table
    4) finally deletes the temp file and then does whatever other data manipulation that I need.

    The code is very complex and I had to get some of it from other Access Super Heroes. They had no problem with sharing. I will be more than glad to share it with you if you would like to tackle my procedure. Its different but it works. Let me know and I'll post it for you.

  3. #3
    Join Date
    Oct 2005
    Location
    Amsterdam, The Netherlands
    Posts
    9

    Question I think I need someting simular

    I think I need a similar code. I really hope you can help.
    What I have is the following.
    alias name
    host name
    Ip adres

    What I need is:
    When I enter a alias name in my access form, I want to get the Host and Ip adres to be entered in two other fields.

    Is this possible?
    thanks

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    You can do this directly through the windows API.

    Check out the relevant winsock api docs here:

    http://msdn.microsoft.com/library/de..._1_1_api_2.asp

    Of particular interest to you would be gethostbyname and gethostbyaddr.
    Last edited by Teddy; 10-28-05 at 09:52.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Dec 2003
    Posts
    26
    Quote Originally Posted by kpalmer
    hey willd,

    I think I can help you. I created a Frame Relay database and wanted to be able to ping addresses from the database with the click of a button so that the user would not have to use the command prompt everytime. It was a real pain in the ass and took forever to come up with a good solution, because not only did I want to be able to ping but I also wanted to be able to run other commands and save them for future use. (ex: Dir, Net Use, Etc...)

    Well this is the best procedure that I could come up with:

    1) creates a temporary text file
    2) the command runs and saves the data in that file
    3) the database imports the data into a table
    4) finally deletes the temp file and then does whatever other data manipulation that I need.

    The code is very complex and I had to get some of it from other Access Super Heroes. They had no problem with sharing. I will be more than glad to share it with you if you would like to tackle my procedure. Its different but it works. Let me know and I'll post it for you.
    I know this is a very old post but do you still know how to do this

Posting Permissions

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