Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top