Test Database connection
A bit of background on our setup. We use crystal reports on our website for our customers to be able to access account history from a database on another server. When that server is down and a user tries to retrieve information, they receive the database logon page.
What can we do to test for that connection before the request is fulfilled? Is there something with crystal inside the report we can do or is this purely a .net issue that we need to pursue?
Don Williams replied
Typically in an application after opening up a report the next step is to set the logon info. At that point your can set the log on info and then test connectivity. Use a try function, if it fails then you can pop up a message box and pass on the info.
Or another option is if you know the Server those users will be connecting to you can add the OLEDB references to your project and before you open a report run a simple query from a test table with one record so it's fast, if it fails then pop up a message box indicating "The DB server you are attempting to use is currently un-available - Please try again later"
Part of your question I believe also has to do with detecting changes to the DB? If you are wanting to use Crystal to detect changes that have been made to the tables CR will do that using the Verify method. Currently though there is no mapping API functionality and CR simply removes any fields/tables that we can not map automatically. Typically it breaks the reports. So if you plan to make changes you must update your reports manually.