2

I've been tasked with exporting a bunch of tables from a Btrieve (Pervasive) database but one of the tables is putting up a fight. I'm using the Pervasice Control Centre but when I run a SELECT * FROM <troublesome table> I get this error:

ODBC Error: SQLSTATE = S1000, Native error code = 0
Unable to open table: <troublesome table>.
The owner namme is invalid(Btrieve Error 51)

I've Google'd this and found out that there can be an "owner" to a DDF file but, if I understand this correctly, all tables are in that file. But there's just one table causing this error so I have no idea what's going on.

Could someone please offer some assistance.

wattostudios
  • 8,666
  • 13
  • 43
  • 57
Jonas Rembratt
  • 1,550
  • 3
  • 17
  • 39

1 Answers1

2

There can be an owner name on a Btrieve file as well as the DDF. In this case, it seems that the Btrieve file has an owner name that is required to even read the file (an owner name can allow read only access without the owner name or no access).
Depending on the version of PSQL you are using, you can issue a SET OWNER= command before executing the SELECT statement. For full documentation on SET OWNER, take a look at http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=sqlref/syntaxref.3.76.html. As far as determining the Owner name, you'll have to ask the developer of the program. There is no default owner name and not master owner name.

mirtheil
  • 8,952
  • 1
  • 30
  • 29
  • Thanks.I had figured that much out since I asked the question. The problem is my poor customer is in a legal process with the developer and I suspect him locking the data file is some sort of childlish act of revenge or something. Is there no utility or something to extract an owner name? I saw a company clled "classic software" claims they can do it so it must be possible I guess. – Jonas Rembratt Dec 20 '10 at 17:22
  • Also, the application that uses the DB seems to be developed in something called "Magic Runtime" and it seems the data is fully accessible to that program. That means the "owner name" must be sent at some point I guess. Does anyone have any experience with this? Any suggestions? Seems I'm more and more turning into a hacker over here... :O/ – Jonas Rembratt Dec 20 '10 at 17:24
  • There is no utility to extract the owner name. Trying to get hack the owner name is getting into a gray area. You are right that the Magic app knows the owner name and passes it. The MKDE tracing mechanism blocks the tracing of owner names. It shows as "Not Shown" in a trace. Really the best thing I can suggest is for your customer to work out the legal issue and get the owner name. I've seen other users run into the same method of blocking access. There's just not a lot you can do. – mirtheil Dec 20 '10 at 20:12
  • Ok, seems there's not point wasting more time on trying to go around the lock then. Thanks alot! – Jonas Rembratt Dec 21 '10 at 13:15