Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

B_ACCESS_TO_FILE_DENIED 46

Status
Not open for further replies.

senorbuckwheat

Programmer
Jul 12, 2002
17
0
0
US
Hi,

I open a Btrieve file and get a unique record using GetEqual(). Both give me B_NO_ERROR status codes and a record is returned into the buffer. Immediately afterwards, I do a Delete() and I get a "B_ACCESS_TO_FILE_DENIED".

Any suggestions?

Thanks.
 
Check the Pervasive monitor and see is there any read only flags set on the file or anything like that. Also check that the P.SQL server software is the latest patched version as I know there was a problem with P.SQl 7 SP 1 as we experienced problems like yours but when we upgraded to SP5 they went away.
 
A couple of other reasons I've seen a 46 appear:

Don't try and mix engines. For example, if you are in a client/server environment with Pervasive.SQL running on the server where the file is located, and you set up a PC with a workstation engine configured, you may be able to open and read from the file with that workstation engine, but if the server engine also has it open, you will not be able to update it.

I've also seen some virus scanners prevent Pervasive.SQL from updating files.
Linda
Pervasive Software Support
 
Did you have a backup running that is locking the file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top