PI1X Basic Programming Manual Ver. 1.10
82/156
3.15.2
DBMS Commands
Purpose
:
To initiate the file search in disk.
Syntax
:
A%=DBMS_INIT_SEARCH(FilePath$ , DBMSID% , S$ ,
N1% ,N2% ,N3%)
Example
:
Result%=DBMS_INIT_SEARCH("C:\DATA\fix.DAT",1,"5,6,6",0
,17,3)
Description
:
A%
is an integer variable to be assigned to the result.
A%
Meaning
0
DBMS initialization fail
1
DBMS initialization OK
5
Open file error
6
The DBMS ID is illegal.
7
DBMS ID already used.
8
The record type is illegal.
9
The field number exceeds 20.
Several key arguments as below:
FilePath$
DBMS file path
DBMSID%
DBMS ID (1~10)
S$
It needs to insert the unsigned char array; the
array represents the length of every field.
N1%
It has no separate symbols between different
fields. (now we only can set 0)
N2%
This argument is each record’s length.
Needs to insert this value, not including the
symbol of line feed.
N3%
This argument is the field’s quantity of each
record (1~20).
Purpose
:
To initiate the advance file search in disk.
Syntax
:
A%=DBMS_INIT_SEARCHADV(FilePath$ , DBMSID% , S1$ ,
S2$, N1% ,N2% ,N3%,N4%)
Example
:
Result%=DBMS_INIT_SEARCHADV("C:\DATA\fix.DAT",1,"5,
6,6",”1,3”,2,0,17,3)
Description
:
This command can initialize a work of advance searching file. After
inserting every argument, you can to search files.
When using this command to initial a DBMS search, you have to