×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to update record using Pervasive SQL?

How to update record using Pervasive SQL?

How to update record using Pervasive SQL?

(OP)
I have installed the Pervasive SQL 8.6 trial and success
to setup it and connect to my Peachtree data, which mean
using select statement in browseing is OK. But I have
problems when I try to update record with where statement.

For example I am success to update the Chart table by using :
"update Chart set LastYrPer12Net = 200"
It updated all the field in Chart which mean the data is
not read only.

However, when I run follow SQL which generated by SQL Data
Manager :
"update Chart set LastYrPer12Net = 200 where AccountID = '10000'"
or
"UPDATE "Chart" SET "Chart"."LastYrPer11Net" = 200 WHERE ("Chart"."AccountID"='10000')"

It have follow error :
ODBC Error
ODBC Error: SQLSTATE = S1000, Native error code = -4953
Access to the requested file is denied(Btrieve Error 46)

It is strange that I able to select record by
"Select LastYrPer12Net from Chart where AccountID = '10000'"
but fail to update with where statement.

Anyone can give me a hint how to solve it?

Thanks in advance !

RE: How to update record using Pervasive SQL?

A status 46 can mean a few things. It can mean:
- The file is marked or opened Read Only
- The file has an owner name.
- The file is open by another engine and the V8.6 engine opened it read only.
- If you were using PSQL v9, it could also mean that you are trying to write to a Btrieve v5.x format file.  

I've not worked with Peachtree so I can't say which it might be.  You'll want to make sure the data file(s)and the DDFs aren't marked Read Only.  Then you'll need to make sure another engine isn't opening the files (exit Peachtree or any other program that uses Btrieve/Pervasive and try again).  And last, you'll want to ask Peachtree if they put an owner name on the files.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
http://www.mirtheil.com

RE: How to update record using Pervasive SQL?

(OP)
Thx Mirtheil

I am sure the data file is not read only, since I can update the record without conditional update

I am sure Peachtree is not running, otherwise I cannot update the record in Peachtree and I only running the Pervasive v8.6 Data Service Manager for Workgroup Engine

But still fail to update with conditional update statement T_T

RE: How to update record using Pervasive SQL?

I've never seen that type of behavior.  You might run a database consistency check on the database to see if there's something with the database that's causing the problem.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
Custom VB and Btrieve development.
http://www.mirtheil.com

RE: How to update record using Pervasive SQL?

I believe Peachtree files use owner names.  These allow viewing but unless you know the password you cannot update the files outside of there software.

Gil

RE: How to update record using Pervasive SQL?

(OP)
Thx Gil, I got what you mean. But how could I know the
owner name?

I am using the example of Peachw8, PCS. Also how could I
know the owner know if I ceate a new company?

Thanks a lot!
Ozero

RE: How to update record using Pervasive SQL?

Best Software owns Peachtree.  They are the only ones that would know that name unless they provide that out to other developers or users.  I doubt they will provide it but you could contact them and see.

Gil

RE: How to update record using Pervasive SQL?

(OP)
T_T~  Then there is no method to update Peachtree's DDE outside
Peachtree? I also tried using VB sample which provided by
Peachtree support site to update DDE, but when I modified the
field and execute ".poke" to process, it have error occur...

Anyone know how to update Peachtree outside of it?

Millions Thx
Ozero

RE: How to update record using Pervasive SQL?

I'm having the very same problem. I need to update the PhaseID field in the JrnlRow.dat file. If I do a general update it works fine, but if I try a conditional update I get the error 46. I'd really appreciate any help on this one as the issue is becoming more urgent with time.

Thanks in advance

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close