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

Pervasive/Btrieve API Example for C++

Pervasive/Btrieve API Example for C++

Pervasive/Btrieve API Example for C++

Hi all,

I used to access Pervasive/Btrieve with VB using ActiveX control. that was quite simple.
Because of corporate decision, I am now programing with BCB5 and I intend to do the same using Pervasive/Btrieve API.
Open a file is quite simple.
What I don't understand, in the help files and samples given with Pervasive, is the method used to access files.
For example, if I do a CallBtrv(B_STEP_FIRST) the returned status is 22. I suppose that I've missed something with DataBuffer et DataLength.

Any help would be welcome.
Thank you in advance

RE: Pervasive/Btrieve API Example for C++

YOu are correct. The status 22 indicates that the Data Buffer paramter is too short. Make sure on your Step or Get operations that the Databuffer parameter is set to at least the size of the fixed length record.  The Pervasive.SQL 2000 SDK includes a BCB sample showing the Btrieve API.

Custom VB and Btrieve development.

RE: Pervasive/Btrieve API Example for C++

What you say is right but as nothing to do with my problem.
In fact, it was juste a C mistake that I made in my BTRV call.
Is there any good website where I could find some sample on BCB and Pervasive/Btrieve subjects ?

Let me know,


RE: Pervasive/Btrieve API Example for C++

You might check the Pervasive web site. I'm more a Visual Basic programmer but have run into the same problems with my code so I can't offer any suggestions on the BCB side of things.  

Custom VB and Btrieve development.

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