<br><font size=2 face="sans-serif">Jim,</font>
<br>
<br><font size=2 face="sans-serif">Since you are "dumping" the data to a central SQL database why not check to see if you can connect to the SQL database. The code you could use is as follows:</font>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=100% bgcolor=white>
<table width=100%>
<tr>
<td width=100% bgcolor=white><font size=2 face="Courier New"><b>Dim cnn As ADODB.Connection<br>
Set cnn = New ADODB.Connection<br>
With cnn<br>
.Provider = "SQLOLEDB"<br>
.CursorLocation = adUseClient<br>
.ConnectionString = "Data Source=VENUS;" & "User ID=sa;" _<br>
& "Initial Catalog=MyDatabase;"<br>
.Open<br>
End With<br>
'Make sure the connection opened:<br>
If Not CBool(cnn.State AND adStateOpen) Then<br>
'Could not open the connection:<br>
MsgBox "Could not open connection..."<br>
Else<br>
'Process data as usual here...<br>
End If</b></font>
<br>
<br><font size=2 face="sans-serif">I found this code at the following site:</font>
<br>
<br><font size=2 face="sans-serif">http://doc.advisor.com/Articles.nsf/nl/12481</font>
<br>
<br></table>
<br></table>
<br>
<br>
<br>
<br><font size=2 face="Courier New"><br>
<br>
-----Original Message-----<br>
From: accessd-bounces@databaseadvisors.com<br>
[mailto:accessd-bounces@databaseadvisors.com]On Behalf Of Jim DeMarco<br>
Sent: Thursday, June 19, 2003 8:33 AM<br>
To: AccessD (E-mail)<br>
Subject: [AccessD] detect network<br>
<br>
<br>
We've got a data collection application that will be run on disconnected<br>
laptops. At least once a week the laptop users will come in to the home<br>
office to dump the data they've collected into our central SQL database.<br>
Does anyone have any code that will detect that the laptop is connected to<br>
our network so we can point their connection to the central DB (as opposed<br>
to their local DB)? Or should we just try to hit the central DB at app<br>
start and trap the error? I don't want to generate an error if I don't have<br>
to.<br>
<br>
Thanks,<br>
<br>
Jim DeMarco<br>
Director of Product Development<br>
HealthSource/Hudson Health Plan<br>
<br>
<br>
****************************************************************************<br>
*******<br>
"This electronic message is intended to be for the use only of the named<br>
recipient, and may contain information from Hudson Health Plan (HHP) that is<br>
confidential or privileged. If you are not the intended recipient, you are<br>
hereby notified that any disclosure, copying, distribution or use of the<br>
contents of this message is strictly prohibited. If you have received this<br>
message in error or are not the named recipient, please notify us<br>
immediately, either by contacting the sender at the electronic mail address<br>
noted above or calling HHP at (914) 631-1611. If you are not the intended<br>
recipient, please do not forward this email to anyone, and delete and<br>
destroy all copies of this message. Thank You".<br>
****************************************************************************<br>
*******<br>
<br>
_______________________________________________<br>
AccessD mailing list<br>
AccessD@databaseadvisors.com<br>
http://databaseadvisors.com/mailman/listinfo/accessd<br>
Website: http://www.databaseadvisors.com<br>
<br>
<br>
_______________________________________________<br>
AccessD mailing list<br>
AccessD@databaseadvisors.com<br>
http://databaseadvisors.com/mailman/listinfo/accessd<br>
Website: http://www.databaseadvisors.com<br>
<br>
</font>
<br>
<br>