I have a project with an SQLServer2000 Database back-end and an Access2000 front-end.
On one of my forms, I'm want to confirm that my network connection is still good before attempting to update the data on the server.
Here's a paraphrased sample of the code I've been using:
Is there a better, (more effective) way to test the connection to the database than using 'CurrentProject.IsConnected'?
Our WAN connections are sometimes shaky and users often get an error message that says, "Write Conflict...another user has modified the record..." I believe they're getting this error because the network connection is temporarily interrupted while they're using the application, but I could be wrong. Any thoughts? Maybe I'm attacking the wrong problem.
On one of my forms, I'm want to confirm that my network connection is still good before attempting to update the data on the server.
Here's a paraphrased sample of the code I've been using:
Code:
Test_Data_Connection:
If CurrentProject.IsConnected = True Then
rsRecordSource(2).Value = NewStatus.Value
rsRecordSource.Update
...
Else
If MsgBox("Error connecting to data source." ...
vbRetryCancel + vbQuestion, "Error") = vbRetry Then
GoTo Test_Data_Connection
Else
DoCmd.Close acForm, Me.Name
MsgBox "You're changes were not saved.", vbInformation + vbOKOnly, "FYI..."
End If
End If
Is there a better, (more effective) way to test the connection to the database than using 'CurrentProject.IsConnected'?
Our WAN connections are sometimes shaky and users often get an error message that says, "Write Conflict...another user has modified the record..." I believe they're getting this error because the network connection is temporarily interrupted while they're using the application, but I could be wrong. Any thoughts? Maybe I'm attacking the wrong problem.