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

Btrieve C# Extra Operations

Status
Not open for further replies.

larrym5353

Programmer
Aug 2, 2003
2
US
I have a Btrieve application and want to expose some of the data as VS.NET Datasets. I have the Btrieve C# sample from Pervasive.

What I don't understand about the sample is what they do to call the Equal Record API. Specifically they first call First_Record + 50. If that is okay they call Equal_Record + 50 with a blank key. If that is okay then they fill in the correct key and call Equal_Record. If that is okay then they return the results to the user.

Does anyone know the purpose of the calls where they add 50 to the operation code?
 
The 50 bias on a GET operation is the "GET KEY" bias. Here's the description from the SDK manual:
"The Get Key bias allows you to perform a Get operation without actually retrieving a data record. You can use Get Key to detect the presence of a value in a file. A Get Key operation is generally faster than its corresponding Get operation. You can use the Get Key operation with any of the following Get operations:..."

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Thanks for the response. That explains what the are doing. I should probably use it in my C++ code also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top