Sorry for my question, I'm really in confuse how they use the btrieve,
It looks like the read data from a buffer, with delphi calls, nowhere I can find BTRV (or BTRIVID, BTRCALL, BTRCALLID) call. Here btrv key word is used , but actually its not a real BtrApi32.pas calls, its a custom designed functions to read from dta file
Here is an example get a patient's first record.
I didn't include all functions here , but I'm sure all these functions are not btrv related
Thank you very much
--------------------------
patientrec = record
nodoss : string[6];
famille : string[20];
prenom : string[20];
end;
procedure Tmainfm.showPatient;
var
patientr: patientRec;
begin
com_assign_btrv(f_patient,return_file_name_f_patie nt);
com_dlen_btrv(f_patient,sizeof(patientrec));
com_op_btrv(b_open, f_patient, p_dummy, p_dummy, 0);
com_op_btrv(b_GETLW_NO_LOCK, f_patient, patientr, p_dummy, 0);
edNom.Text := patientr.famille+ ' ' +patientr.prenom;
com_op_btrv(b_close,f_patient,p_dummy,p_dummy,0);
end;
procedure com_assign_btrv(file_index : integer; s : string80);
begin
s := s + #0;
move(s[1],nfname[find_btrv_index(file_index)],length(s));
end;
procedure com_op_btrv(op : integer; file_index : integer; var rec;
var key; key_index : integer);
begin
if (op mod 50) = b_begin then
transaction_active := true;
normal_com_op_btrv(op,file_index,rec,key,key_index );
if op = b_end then
transaction_active := false;
end;