beautypg.com

Searchmultifield_gf – Argox PA-20 Programming Guide User Manual

Page 62

background image

PT-20 Programming Guide

60

Description: Search the correctly appointed field. After search success, acquiring

another appointed field which including record of this field.

Several describe the argument as follows:

argument

description

_DBMS* F_Search

The file’s searching structure that has been

initialized.

char* field

String data wanted to match.

int search_fieldno

Field wanted to search.

int recordno

Begin to search from which data.

int get_field_no

After contrasting success, acquiring the

data of appointed field in this record.

char* F_Buffer

After contrast success, it will write record

which included this field into buffer.

int flag

FORWARD => Search from forward to

backward

BACKWARD => Search from backward to

forward

As success of searching, the file index will

stay in successful record front. When

search defeat, the file index will not be

moved.

Returns:

When “F _ Buffer = NULL”, pass back – 1: Search defeat; Pass other

value back: That is the size of space for buffer.

When “F _ Buffer ≠ NULL”, pass back – 1: Search defeat; Pass other

value back: That is the record position which confirm to contrast data.

SearchMultiField_GF

Purpose:

Search the designated field. The field’s information include field string

and field number.You can write many fields in this field buffer. After

searching success, acquiring the appointed field in including this field’s

record.

Syntax: int SearchMultiField_GF(_DBMS* F_Search, char* multi_field, int

recordno, int get_field_no, char* F_Buffer, int flag);

Example call:

char str[20]=”00001,0;abcdefg,1”,str_buffer[60];

SearchMultiField_GF(&fsearch, str, 0,3,str_buffer,FORWARD);

Includes:

#include “DBMS.h”

Description: Search the correctly appointed field. After search success, acquiring

another appointed field which including record of this field.

Several describe the argument as follows: