Solved

Detecting Database

Posted on 2004-08-10
9
176 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
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 31

Expert Comment

by:qwaletee
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 5

Author Comment

by:gbentley
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks. The startup routine works fine.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

771 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

12 Experts available now in Live!

Get 1:1 Help Now