Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB Connection String with MS Access - By using MAC address instead of IP Address

VB Connection String with MS Access - By using MAC address instead of IP Address

Scheduled Pinned Locked Moved Visual Basic
helpdatabasetutorial
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aaraaayen
    wrote on last edited by
    #1

    Hi All, I am developing one application with VB 6.0 and MS Access. I am using the following connection string to connect to database. Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\9.124.124.90\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb" In the above I have given the IP address of the system where the database OT_Log.mdb is located. But I am facing problem that is, Since the IPAddress is dynamic I cannot give the IP address , so I thought of using the MAC Address of the System ( Which is static even the IP address is changed). (Mac Address - Physical Address). But I dont have any idea how to give the MAC address in the connection string instead of IPAddess. Or is there any code to recover ip address by giving the mac address. Please Please help me. Thanks you all in advance, Regards

    C S 2 Replies Last reply
    0
    • A aaraaayen

      Hi All, I am developing one application with VB 6.0 and MS Access. I am using the following connection string to connect to database. Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\9.124.124.90\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb" In the above I have given the IP address of the system where the database OT_Log.mdb is located. But I am facing problem that is, Since the IPAddress is dynamic I cannot give the IP address , so I thought of using the MAC Address of the System ( Which is static even the IP address is changed). (Mac Address - Physical Address). But I dont have any idea how to give the MAC address in the connection string instead of IPAddess. Or is there any code to recover ip address by giving the mac address. Please Please help me. Thanks you all in advance, Regards

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      I would suggest looking into something like DynDNS and using that

      Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      A 1 Reply Last reply
      0
      • C Christian Graus

        I would suggest looking into something like DynDNS and using that

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        A Offline
        A Offline
        aaraaayen
        wrote on last edited by
        #3

        Hi, Thanks lot. Can you give me little more about DynDNS. Regards,

        C 1 Reply Last reply
        0
        • A aaraaayen

          Hi, Thanks lot. Can you give me little more about DynDNS. Regards,

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Please read the article I link to in my sig.

          Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          1 Reply Last reply
          0
          • A aaraaayen

            Hi All, I am developing one application with VB 6.0 and MS Access. I am using the following connection string to connect to database. Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\9.124.124.90\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb" In the above I have given the IP address of the system where the database OT_Log.mdb is located. But I am facing problem that is, Since the IPAddress is dynamic I cannot give the IP address , so I thought of using the MAC Address of the System ( Which is static even the IP address is changed). (Mac Address - Physical Address). But I dont have any idea how to give the MAC address in the connection string instead of IPAddess. Or is there any code to recover ip address by giving the mac address. Please Please help me. Thanks you all in advance, Regards

            S Offline
            S Offline
            Steven J Jowett
            wrote on last edited by
            #5

            Can you not use the computer name rather than its IP Address? e.g. Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\**MyDataServer**\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb"

            Steve Jowett ------------------------- It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)

            A 1 Reply Last reply
            0
            • S Steven J Jowett

              Can you not use the computer name rather than its IP Address? e.g. Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=\\**MyDataServer**\sanramal1\overtime log\Overtime Log\Data\OT_Log.mdb"

              Steve Jowett ------------------------- It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)

              A Offline
              A Offline
              aaraaayen
              wrote on last edited by
              #6

              Hi, Thanks lot. Yes I tried by giving the computer name. But the problem is, when i install it in other's system, in some of the system it is connecting and working fine, but in some system it is not connecting with the system name that I have given in connecting string. It is because those users are in different subnet in network. So who are all in same subnet of the server (That is the system given in connecting string) they can able to connect to the application and work well. Can you please give me some ideas to overcome this problem. It is really very very urgent. Thanks lot. Regards,

              D 1 Reply Last reply
              0
              • A aaraaayen

                Hi, Thanks lot. Yes I tried by giving the computer name. But the problem is, when i install it in other's system, in some of the system it is connecting and working fine, but in some system it is not connecting with the system name that I have given in connecting string. It is because those users are in different subnet in network. So who are all in same subnet of the server (That is the system given in connecting string) they can able to connect to the application and work well. Can you please give me some ideas to overcome this problem. It is really very very urgent. Thanks lot. Regards,

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                This question was asked and answered before. You have a DNS configuration issue on your network. Only your LAN Admin can fix this problem so that all the machines on the network can resolve the name of the server to it's IP address. This is your ONLY possible solution! You can NOT use the MAC address in the connection string. The MAC address isn't usable by your code at all. It's a physical layer address used to transmit packets between network cards on the same physical subnet. The MAC is completely meaningless to your application.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups