Solved

Detecting Database

Posted on 2004-08-10
9
183 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 125 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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