SqlConnection / wan problem

  • Thread starter Thread starter Zanna
  • Start date Start date
Z

Zanna

Hi all,

I've got a problem that I don't understand, and maybe someone can help me.

I use in my app an SqlConnection thru my WAN to connect to an SQLserver DB.

This work fine, but sometimes, and I didn't understand when, my
connection fall down, and the creation of objects as DataReader causes
an exception.

Is there a reason for this?
I don't know: when the PPC is put or leaved from the cradle (activesync
connection) or when the PPC is turned off, or if the PPC is leaved alone
for a certain amount of time... I've no idea... sometimes it works the
same, sometimes no.

Also, what will happen if the PPC is taken away from the AccessPoint range?
And then returned into the lan?
I need to re-connect?
Can I intercept the disconnection?

Thank you!
 
Hi Zanna,

If you lose your connection to the network while your SqlConnection is
open, the connection will be lost and you will need to re-open the
connection. You may wish to handle the exception and retry the connection
if you can.


Kevin Boske
([email protected])
SQL Server CE Team
Microsoft
----------------------------------------------------------------------------
----------------------------------------
Everything you need to know about SQL Server CE:

http://www.microsoft.com/sql/ce/techinfo/default.asp
----------------------------------------------------------------------------
----------------------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
----------------------------------------------------------------------------
----------------------------------------
--------------------
From: Zanna <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.compactframework
Subject: SqlConnection / wan problem
Date: Tue, 27 Jan 2004 10:42:24 +0100
Lines: 23
Message-ID: <[email protected]>
NNTP-Posting-Host: omegaadsl2.interac.it (212.183.161.218)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 1075196774 25375725 212.183.161.218 ([184808])
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5)
Gecko/20031007
X-Accept-Language: en-us, en
Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.
phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu
-berlin.de!uni-berlin.de!omegaadsl2.interac.IT!not-for-mail
Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44097
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework

Hi all,

I've got a problem that I don't understand, and maybe someone can help me.

I use in my app an SqlConnection thru my WAN to connect to an SQLserver DB.

This work fine, but sometimes, and I didn't understand when, my
connection fall down, and the creation of objects as DataReader causes
an exception.

Is there a reason for this?
I don't know: when the PPC is put or leaved from the cradle (activesync
connection) or when the PPC is turned off, or if the PPC is leaved alone
for a certain amount of time... I've no idea... sometimes it works the
same, sometimes no.

Also, what will happen if the PPC is taken away from the AccessPoint range?
And then returned into the lan?
I need to re-connect?
Can I intercept the disconnection?

Thank you!
 
Back
Top