HP3000-L Archives

October 1995, Week 5

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:
James Herod <[log in to unmask]>
Reply To:
James Herod <[log in to unmask]>
Date:
Fri, 27 Oct 1995 23:33:07 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
Ed Pudlo ([log in to unmask]) wrote:
: We're trying to access two different databases using similar C
: calls.  I can open both databases without any problems--the
: return values are both 0.  One database will give me access to
: the datasets, but the other one gives me the message:
: DATASET (TABLE) NONEXISTENT OR INACCESSIBLE
 
: [snip]
 
: dbopen(dbname, password, mode, status);
: dbname--database I am accessing
: mode--I use mode 5 so I can read only with concurrent modify
 
: dbget(dbname, dset, mode, status, list, buffer, key);
: dbname--database that I opened
: dset--dataset I am trying to read a record from
: mode--I use mode 7, since I am accessing a master dataset
 
: I can open the database I need to access, but when I try to use
: dbget, I get error number -21, which is a "bad dataset
: reference".  The data set name I am using in my call does exist
: and is correct.  When I go into the database manually, I can
: retrieve the data.  The problem is when I use the C code.  The
: same C code works when I am accessing another database, but not
: with this one.  I have tried to access other datasets in this
[snip]
 
It's not clear from your code above, so I wonder if you are reusing
the same dbname buffer for both databases?  You must execute separate
DBOPENs with distinct dbname buffers, e.g. dbname1 == "  base1; ",
dbname2 == "  base2; ".  You might also put a call to CAUSEBREAK
after the DBOPENs and look at the two databases using DBUTIL, so that
you can verify that you actually opened what you thought you did.
 
In any event, one would have to see the actual code to be sure what
was really going on.
 
--Jim

ATOM RSS1 RSS2