Btrieve Ýndexes.... -
11-17-2004
, 02:00 AM
Hi to All....
I have a problem with the indexes. In my delphi 5 application i defined
some structs. I also created betrieve files according to indexes defined
below. I have two structs and two btrieve files. When i use B_GET_EQUAL
with the key number 2 (MAGAZA_KONSINYE_STOK_STRUCT) as defined below the
function returns status = 0 if i entered records to the btrieve files. But
for the second struct (MAGAZA_KONSINYE_BARCODE_STOK_STRUCT) it returns
Status = 4.
MAGAZA_KONSINYE_STOK_STRUCT = packed record
StoreCode : SmallInt; // 0.KEY : StoreCode
CompanyNo : Array [0..8] of Char; // 1.KEY : StockCode
StockCode : Array [0..18] of Char; // 2.KEY : StoreCode +
CompanyNo + StockCode
Quantity: Double; // 3.KEY : StoreCode + StockCode
Empty : Array [0..150] of Char;
end;
Key : Record
StoreCode : SmallInt;
CompanyNo : Array [0..8] of Char;
StockCode : Array [0..18] of Char;
end;
There is no problem with this index definition.
Second Struct has index problem. Because i cannot access any entered record
in the file by using the key number 2;
MAGAZA_KONSINYE_BARCODE_STOK_STRUCT = packed record // barcode lu stok
takibi içindir
StoreCode : SmallInt; // 0.KEY : StoreCode
BarCode : Double; // 1.KEY : BarCode
CustomerNo : Array [0..8] of Char; // 2.KEY : StoreCode
+Barcode+ CustomerNo
StockNo : Array [0..18] of Char;
Quantity : Double;
Empty : Array [0..150] of Char;
end;
//I have a problem with this key definition.
BarcodeKey : Record
StoreCode : SmallInt;
Barcode : Double;
CustomerNo : Array [0..8] of Char;
end;
What am i missing?
if you need, i can also send btrieve files. I am using btrieve
maintanence utility to create files and indexes.
Thanks in advance... |