473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to check if the connection to a remote computer exist

Hi,

I looking for a solution for how to check if a connection to a remote
computer exist or not using vb.net.

I 'm writing a program which will request data from a remote sql server. I
need to check if the connection to the remote server exist, before open the
connection or run the the sql command.

Pls helps, urgent.

Thanks,
Chin
Nov 22 '05 #1
3 2896
Hello Chin,

I'd try to open the connection. If exception occurs, that means the connection
to the SQL Server can't be established.

Hi,

I looking for a solution for how to check if a connection to a remote
computer exist or not using vb.net.

I 'm writing a program which will request data from a remote sql
server. I need to check if the connection to the remote server exist,
before open the connection or run the the sql command.

Pls helps, urgent.

Thanks,
Chin


Nov 22 '05 #2
I have tried this method.

However, this will coz my system hang, and I only knew the connection does
not exist until the connection timeout.

Is there any better solution ?

Thanks,
Chin
"Hayato Iriumi" <hi*****@hotmail.com> wrote in message
news:49*********************@news.microsoft.com...
Hello Chin,

I'd try to open the connection. If exception occurs, that means the
connection to the SQL Server can't be established.

Hi,

I looking for a solution for how to check if a connection to a remote
computer exist or not using vb.net.

I 'm writing a program which will request data from a remote sql
server. I need to check if the connection to the remote server exist,
before open the connection or run the the sql command.

Pls helps, urgent.

Thanks,
Chin


Nov 22 '05 #3
I really don't think there is any other solution. When you say "system
hang", does that mean your UI hangs? If that's the case, I'd spawn off a
thread to let it do check connection checking and let it raise an event
to see if the connection succeeded or not. That way, your UI won't hang.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Cliff Wells | last post by:
Hi, I'm writing an application that needs to know if an Internet connection is available. Basically, I want to have something similar to what a lot of email clients have, where the app can work...
3
by: Chin Chien Ping | last post by:
Hi, I looking for a solution for how to check if a connection to a remote computer exist or not using vb.net. I 'm writing a program which will request data from a remote sql server. I need...
8
by: Peter Larsson | last post by:
Hi there, I've recently developed a VBA-program in Excel that fetches and presents data from a distant Access database over a wireless peer-to-peer network (both computers running Win XP Pro)....
4
by: GAVO-UK | last post by:
Hello everyone. Using Access 2003 and MSDE I just started experimenting using Access as the front end for SQL using *.adp, and would like to connect the front end to the back end remotely,...
3
by: GAVO-UK | last post by:
Experts I'm experimenting with ADP and MSDE and I'm trying to connect a remote front end through the internet. I have already enabled TCP/IP connection on port 1433 on the MSDE host computer...
2
by: Maziar Aflatoun | last post by:
Hi guys, I'm using Windows authentication to connect to SQL Server 2000. On my computer the connection is fine. Now if I move it to a remote server, how to I hard code my Username/Password in...
6
by: sree | last post by:
Hi, i want to check whether a file from remote server is existed or not. The file_exists() checks for local server only. But i want a function that checks the remote server.
1
by: =?Utf-8?B?TWVuYWth?= | last post by:
i have developed a web application for intranet and it is installed on the Computer name 'Server' and its already installed sql server 2005, never problem when connecting to sql server 2005 on the...
2
by: CLM | last post by:
When I test the remote access at work (lapttop computer to desk top computer) the connection works fine. When I bring the laptop home and try to connect to my desktop I get the error msg: The...
3
by: Kevinp | last post by:
I'm trying to get my program to connect to a SQL Server 2005 database over the internet. The remote computer is on another network and it's connected to our network through Windows VPN. I'm running...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.