Results 1 to 3 of 3
  1. #1
    GeekInOhio's Avatar
    GeekInOhio is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    25

    ADP/ADE - Recovering From Connection Failure

    All,

    I admin an Access 2007 ADP that is distributed to our user base as an ADE. The back end is MSSQL 2005. Recently, we have begun deploying this software to employees in the field who connect to the corporate network via VPN. Because our field employees are sometimes connecting from some seriously flaky Internet connections, we have seen an uptick in Connection Failure errors.

    I've been researching ways to detect and reestablish a failed network connection from VBA so that the user doesn't encounter the errors, or the need to close and reopen the application to continue working. This post appears to get me most of the way there, in that it both suggests a way to detect the failure and reestablish a connection on the fly:

    http://www.utteraccess.com/forum/lof.../t1962513.html



    Basically, it suggests replacing the call to CurrentProject.Connection with a call to your own custom function, looking something like this:

    Code:
    Function fCurrentConnection () As ADODB.Connection
    
        If CurrentProject.Connection.State = 0 Then
            CurrentProject.OpenConnection "YourConnectionString"
        End If
        Set fCurrentConnection = CurrentProject.OpenConnection 
    
    End Function
    


    My problem is that I define my connection in the built in server properties of the project. My users connect using Windows NT Integrated security. I don't know what I should put in the "YourConnectionString" area. Is there a way to tell Access to use the stored settings to reconnect, or alternatively, can someone point me to an example string that connects to a server name and database name using Windows NT Integrated security?

    Thanks!

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    sConnString = "Data Source=<ServerName>; Initial Catalog=<DatabaseName>; Integrated Security=SSPI"

  3. #3
    GeekInOhio's Avatar
    GeekInOhio is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    25
    Thank you!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. recovering *.RBF and .DAT* Files
    By frowsyone in forum Import/Export Data
    Replies: 3
    Last Post: 03-20-2014, 04:14 PM
  2. Trouble recovering database : Auto numbering
    By ArseniusCamillus in forum Access
    Replies: 4
    Last Post: 02-14-2012, 04:56 AM
  3. 2010 Runtime ADODB Connection Failure
    By SteveDurham in forum Access
    Replies: 2
    Last Post: 10-04-2011, 03:31 PM
  4. f4 combo box failure
    By djuplina in forum Access
    Replies: 2
    Last Post: 09-19-2011, 01:03 PM
  5. Runtime 2010 ADODB Connection failure
    By SteveDurham in forum Import/Export Data
    Replies: 5
    Last Post: 07-18-2011, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums