?
Solved

Detecting Database

Posted on 2004-08-10
9
Medium Priority
?
186 Views
Last Modified: 2013-12-18
I have a Notes db which accesses corporate data via an ODBC connnection. The problem is that if the person is not on the network, the lookup fails and Notes shuts down.

Is there some way to detect whether the database is accessible without crashing Notes? My thought is to use this test to hide the New button so the user can't create new documents when offline. I've already got it to work happily with existing documents by saving the data and not doing the lookups on existing docs.

Thanks
0
Comment
Question by:gbentley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 11770453
Instead of having every client to set up his own ODBC connection, you could use DECS and make the connection from the server's database to the corporate data. No server available -> no corporate data but without the errors. Or has every user a local copy of your application and uses it, even when connected to the server? Just for the background: what Notes/Domino versions do you use?
0
 
LVL 5

Author Comment

by:gbentley
ID: 11770573
Some users will certainly have local replicas and will often be offline. We also have the problem that there are 35 offices where there is no local Notes server, but the corporate data for that office resides on that offices network server. The users access a Domino server remotely for mail and some other dbs, but this one has to look at the ODBC connection on the users PC which maps to the local database they need to use.

And, I'm afraid buying 35 Notes servers is not an acceptable solution!

Thanks
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11772630
You can check that by using @Subset(@DBNAME;1)

This will return server name if the db accessed is on server and "" if it is local. Use this to hide the button

~Hemanth
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 31

Expert Comment

by:qwaletee
ID: 11778356
If I understand you correct, you are saying that if the ODBC data source is available, then all is well and good, but if the ODBC source is not available, Notes crahses when it tries to access ODBC.

This should not happen in the first place.  You should recieve a detecable ODBC driver failuree message, not a client crash.  How are you accesisng ODBC?  @DBxxx?  LS:DO (use "*odbc")?  Lotus Connectors (use "*lclsx")?  ADO?
0
 
LVL 5

Author Comment

by:gbentley
ID: 11779779
Herman - The Notes db may be on the users C: drive whether or not they are in the office.

qwaletee - I'm accessing it using DBLookups and @DBColumns. The usage is to populate a pair of list boxes to allow the users to select a Client. I've tried calling @Dblookup putting the result in a variable and testing that with @IsError, but it still dies horribly.

Is there a way to populate a Listbox/Combo/DialogList using an Agent? That would solve my problem.

Thanks for the suggestions so far.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 500 total points
ID: 11783606
Write a small script in the database open.. which essentially connects to DSN and if it is successful, write a environment variable saying it is in Online mode.. If not make it offline mode and use this variable to hide or manipulate data.

PS: Instead of environment variables you can use profile doc to store values too...
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11788513
Don't use @DbLookup agains ODBC.  Instead, use LotusScript with LCLSX (or even LS:DO), which is more robust.
0
 
LVL 5

Author Comment

by:gbentley
ID: 11789494
qwaltee,

How exactly do I use that method to populate a ComboBox?

Herman - I like that approach, I'll try coding it up and get back to you all.

Thanks
0
 
LVL 5

Author Comment

by:gbentley
ID: 12611190
Thanks. The startup routine works fine.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 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