Dbms, Ini_search – Argox PA-20 Programming Guide User Manual
Page 56

PT-20 Programming Guide
54
Purpose:
Use “Ini_Search” can initiate the file search function in disk.
Syntax: int Ini_Search(_TFILE* filehd,_DBMS* F_Search, unsigned char
*pusFielddlt, int record_type, int record_length, int total_field_no, int
total_record_no);
Example call: Example 1: Variable field length
_DBMS fsearch;
_TFILE *filepoint;
unsigned char ausFielddlt
[2]=”,”;
filepoint = _fopen(“c:\\data\\data.txt”,”r+”);
Ini_Search(filepoint,&fsearch, ausFielddlt,1,0,5,0);
Example 2: Regular field length
_DBMS fsearch;
_TFILE *filepoint;
unsigned char field_size[5]={6,5,4,5,6};
filepoint = _fopen(“c:\\data\\data.txt”,”a+”);
Ini_Search(filepoint,&fsearch, field_size,0,26,5,0);
Includes:
#include “DBMS.h ”
Description: This function can initialize a work of searching file. After inserting every
argument, you can use _ DBMS* F _ Search to search files. Several
introduces the argument as follows:
argument
description
_TFILE* filehd
An opened file handle.
_DBMS* F_Search
One of _DBMS start address has already
declared. Originally after the beginning
success this argument was used for written
into various kinds of search.