|
-
Oct 8th, 2008, 11:37 PM
#1
Thread Starter
Lively Member
[RESOLVED] Scan Network for Specific Server
Hello to everybody,
i have this little thing bugging and i haven't found a solution yet.
I have an application that connects to a remote SQL Server to drill some data.Although server's IP never changes there is a chance that something happens and this IP is changed.Given the fact that the connection string for SQL user IP address only i need to know if there is some way to scan my network (lets say it goes from 192.168.1.xx to 192.168.2.xx) for the specific server (i will call him Svr02) and return it's IP address.
Thanks in advance
-
Oct 9th, 2008, 06:25 AM
#2
Frenzied Member
Re: Scan Network for Specific Server
-
Oct 9th, 2008, 06:43 AM
#3
Thread Starter
Lively Member
Re: Scan Network for Specific Server
This is not possible....i have tried a couple of times but no luck.It is also mentioned clearly to several sites that show how to connect a pda to sql server.It is some what bizzare but it is true.Plz check it by urself i would be most interested to solve this
Take a look here
http://netcf2.blogspot.com/2005/12/a...ress-from.html
Just take a look at the first comments
-
Oct 10th, 2008, 11:11 AM
#4
Frenzied Member
Re: Scan Network for Specific Server
I use a server name/instance to connect wirelessly from PDA's and it works fine. I know at one point, it was said it didn't work, but it does, although I use a different port.
A string that works is...
Persist Security Info=False;Integrated Security=False;Server=Till1\SqlExpress,39250;initial catalog=Waiter;user id=sa;password=xxxxxxxx;
Pete
-
Oct 12th, 2008, 11:54 PM
#5
Thread Starter
Lively Member
Re: Scan Network for Specific Server
I will test asap ...If this work it would be lifesaver
-
Oct 20th, 2008, 02:50 AM
#6
Thread Starter
Lively Member
Re: Scan Network for Specific Server
Some Late Response
I think i have found it
Dim ServerIp As IPAddress
ServerIp = Dns.GetHostEntry("YourServerName.domain.TheNameofyourDomain.com").AddressList(0)
And you get the IP...
Please take a note that it needs the full computer name
-
Oct 20th, 2008, 07:13 AM
#7
Frenzied Member
Re: Scan Network for Specific Server
That can take a long time - I think the servername in the connection string is quicker and more flexible
-
Oct 20th, 2008, 07:34 AM
#8
Thread Starter
Lively Member
Re: Scan Network for Specific Server
I gave it a quick try with the servername as u suggested and it failed.Unfortunately i am under pressure right now to make some more tests but the solution i gave works fine even for the emulator.And the time is about 1-2 seconds to make the resolving.Possibly this could work as a fail safe..if something goes wrong....
-
Oct 20th, 2008, 08:07 AM
#9
Frenzied Member
Re: Scan Network for Specific Server
If you get the server name long though, it will go away for a long time
Good solution, just pointing out potential pitfalls 
Pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|