Solved

Connection Failure ADP to SQL Server

Posted on 2006-11-07
2
319 Views
Last Modified: 2008-02-01
All,
I have an SQL sever backend and ADP front end.  As I was working along I suddenly got a Message "Connecton failure" on the update of a form.  I re-ran the procedure and noticed that even though I had an error trap "On error got to" statement the error occurred on the EXIT SUB line and did not go through the error trap at the bottom of the procudure.  I would simply get the message titled "ADP" connection failure.  My database use an application role which is turned on when the uses opens the front end app.  I noticed after playing around that the ADP will simply try to reconnect on its own if it succeeds it continues or just gives the connection failure message at which point I have to log out and back in. PROBLEM:

1. How do I trap a run-time connection failure
2. If ADP is trying to re-connect on its own, I would imagine that it is not calling the TurnOnAppRole which I have when the users opens the dB. This would allow the user to cintinue in the dB not under the control of the app role I would think - this is bad.
IN SHORT:
3. How can I know the status of the ADP/SQL connection and App role status during runtime (From the ADP Front End), and if there is a failure try to reconnect and turnon the app role automatically or if that fails give the user a message and log them out.
0
Comment
Question by:pscholl
2 Comments
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 500 total points
ID: 17894653
The connection failure isn't actually caused by a line in your code so the error handler doesn't pick it up.

Therefore I don't think there is a way to trap it.


I can only suggest that you try and extend the connection and command timeouts in the connection properties, though how you actually do this I'm not too sure.

If the timeouts are extended, it might wait longer before deciding that the connection is broken.


Sorry I can't help too much more.
0
 
LVL 1

Author Comment

by:pscholl
ID: 17930894
Thank You nmcdermaid for your response and input.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now