HP3000-L Archives

March 1995, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brian White d1352 <[log in to unmask]>
Reply To:
Brian White d1352 <[log in to unmask]>
Date:
Mon, 27 Mar 1995 14:03:29 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
I've accomplished this with a subprogram I wrote in C, to which I pass
a 2-character item.
 
I first check to see if there is a JCW set to the database ID returned by
DBOPEN. I use the database name plus _ID as my jcw name. For example,
ISSDB's DBOPEN value becomes the value for the ISSDB_ID variable.
 
To ensure that this value is still valid, I do a DBINFO mode 201 on a set I
know
is only in that database. If this is successful, I can return the database
ID is found int he JCW.
 
If it fails, then I need to do another DBOPEN because the database ID I've got
is no longer valid.
 
FYI, the dbinfo takes about 1 millisecond according to DBDRIVER, so the
penalty for this is not large; mush less than a DBOPEN when it is not needed.
 
I have written separate routine for each database we need to do this for; it
makes the calls simpler. You could write one with more parameters, there would
be less code to maintain that way.
 
 
Brian J. White
[log in to unmask]

ATOM RSS1 RSS2