Subject: | |
From: | |
Reply To: | |
Date: | Mon, 27 Mar 1995 14:03:29 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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]
|
|
|