I have a remote database that will be accessed through a client program.
The thing is, I want the client to auto detect the IP Address of the machine
where the database is located, so that when I initialize the value of my
connection string it would be like this:
In that way, the client program will automatically connect to the
remote database whatever the IP Address of the machine where the
remote database is. I don't have any clue to do this so, I'm
asking for your help guys.
I suggest you reconsider connecting via the IP address. Let the infrastructure take care of name/address translation for you and just connect using the server name. Using the IP address could impact database access in a system where clustering/mirroring provides high availability.
If this is over LAN or WAN (VPN or leased line), then you can just use the computername. Your DNS or WINS will take care of the name resolution to the IP.
If you plan to connect over the internet then perhaps you've got to search services like dynDNS or something similar (google for free dynamic dns).
Some DSL routers support dynamic dns and you can have a hostname with a dynamic IP with no software.
BUT, be warned the type of access you are looking for in your "server" machine (sharing your actual file) shouldn't be done over the internet without a VPN (and because of this you don't need dynDNS).
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...