Results 1 to 10 of 10

Thread: [RESOLVED] accesing a DB through lan

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    269

    Resolved [RESOLVED] accesing a DB through lan

    Hi. i read a few topics about this but i want to tell my case to be sure...

    The office im making the prog for has 5 PC. My prog will be installed on 1 PC, and all other 4 PCs in the office will be able to access it by LAN. The program works with an access DB.

    So my question is:
    What would the path to that DB be from another PC?
    Lets say the program is in C:\Progs\DataStore\DataStore.exe

    Also, would i need a PC name or something similar for that path? how do i get it by code?

    Thanks. Tell me if something i wrote is too confusing

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: accesing a DB through lan

    well what youve written is acctually sufficient for us to know the prob

    what you need to do is to make sure that the folder or directory where your db resides is shared. in your case, i suggest you share the Datastore folder and access it from another pc like accessing a network path

    ...; Data Source = \\serverPCnameOrIPAddress\DataStore\db.mdb;...
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    269

    Re: accesing a DB through lan

    thnaks a lot. but if those PC are sharing all the C drive already then the path would be \\serverPCnameOrIPAddressC:\Progs\DataStore\DataStore.exe?

    And how can i get the PC name or IPaddress? i assume its not the same as the username... (actually i think in this case it is the same name but not always will be like that)

  4. #4
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: accesing a DB through lan

    usually when the drive is shared, it makes use of the $ sign in place of the : so it would be like

    \\serverPCnameOrIPAddress\C$\Progs\DataStore\db.mdb
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  5. #5
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: accesing a DB through lan

    to get the computer name just right click on the my computer icon in the desktop of your server then go to computer name tab then look for the full computer name section
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    269

    Re: accesing a DB through lan

    thanks... and is there anyAPI to access that name... so if the name changes i wont have to recompile the prog

  7. #7
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: accesing a DB through lan

    you can make use of the ip address of that pc so that no matter what you do with the name, it will still be accessed in the network

    make sure you set the ip properly
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    269

    Re: accesing a DB through lan

    but also the pc or the net or anything could change... so the ip wont be the same forever. Thats why i need to make a reference to the ip/name of the PC.

  9. #9
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: accesing a DB through lan

    just make sure that your server ip wont change and its okay no matter what you do with your network.
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2006
    Posts
    269

    Re: accesing a DB through lan

    ok. Thanks for all your help .
    Ill make it with the name for now and maybe ill ask in the API section later... or ill look for it myself if i can do it.

Posting Permissions

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



Click Here to Expand Forum to Full Width