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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pervasive/Btrieve API Example for C++

Status
Not open for further replies.

ArnaudAbadie

Programmer
Mar 14, 2001
43
FR
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
 
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.
Mirtheil
mirtheil@mirtheil.com
Custom VB and Btrieve development.
 
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,

Arnaud
 
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. Mirtheil
mirtheil@mirtheil.com
Custom VB and Btrieve development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top