[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Detecting Database

Posted on 2004-08-10
9
Medium Priority
?
189 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

830 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