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

Btrieve Error 22

Status
Not open for further replies.

billiard

Programmer
Joined
Jul 15, 2015
Messages
8
Location
ZW
In Pervasive 10.3 my INSERT script gives error

Pervasive.Data.SqlClient.Lna.k: [LNA][Pervasive][ODBC Engine Interface][Data Record Manager]The data buffer parameter is too short(Btrieve Error 22)

How do I fix this ?
 
Sounds like your DDFs may not match the data file. Are the data files / DDFs from a third party application? If so, make sure the DDFs are correct and accurately describe the data files.
The status 22 is caused when a buffer specified is smaller than the Engine expects. If a field in the DDF is defined as a 100 byte character field but the Btrieve file defines a record of less than 100 bytes, the status 22 can occur.

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
How do I make sure the DDFs are correct and accurately describe the data files? When I insert a record do I have to assign values to all fields in a table?
 
You only have to specify values for fields that are defined "NOT NULL".
You can use the "Check Database" function in the DDF Builder tool to check the database. Here's a link to docs for v11 but they should apply for v10 too:
[URL unfurl="true"]http://docs.pervasive.com/products/database/psqlv11/wwhelp/wwhimpl/js/html/wwhelp.htm#href=ddfbuilder/ddfb_gui.2.3.html#288453[/url]


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top