Expert Answer Center > Experts On Demand > View Answer
EMAIL THIS
Experts on Demand
  EXPERTS ON DEMAND HOME     POSE A QUESTION     VIEW ANSWERS     BROWSE BY TOPIC        RSS FEEDS  
I am planning to write an application that will work both in offline and online modes, depending on whether the database connection to the remote server is there or not. What would be the best solution to follow? Please reply in detail. QUESTION POSED ON: 15 APR 2005
QUESTION ANSWERED BY: Samuel Matzen You will need two connection strings to the database: the first for the remote database and the second for the local database. When the application starts, create a new connection and set the connection timeout to something like 15 seconds or so and try to connect to the remote database. If this connection fails, open a connection to the local database. If it fails, there is no database available.
HomeExperts on DemandIT Expert Webcast SeriesExpert KnowledgebaseSite Index
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts