RIEVTECH STUDIO SOFTWARE MANUAL Buffer Pointer: the pointer to the buffer array Buffer Size: The length of buffer being read, the size will be returned when read complete, maximum buffer size is 4096. Timeout Limit: unit mS, if no data is received within nmS, or buffer is full, the receive function will return. Return Value: the number of data actually be read, return value of -1 indicates error. Example: unsigned char recv_buff[]; intdata_count=Inport(1,recv_buff,16,10); 6.2.2.7 SQL Database Access Command: SqlCmd intSqlCmd(Database file ID, SQL command string pointer); Database file ID:
int type, 0 represents the database for historical and alarm events; 1,2,3...represent the database file corresponding to the data sampling IDs. SQL command string pointer: char type, pointer to the SQL command strings. Return Value: int type, 1-Success, 0-Failed. 6.2.2.8 SQL Database Select: SqlSelect intSqlSelect(Database file ID, SQL command string pointer, Buffer of inquiry results, Number of Rows Returned, Number of Columns Returned); Database file ID: int type, 0 represents the database for historical and alarm events; 1,2,3...represent the database file corresponding to the data sampling IDs. SQL command string pointer: char type, pointer to the SQL command strings.
Buffer of inquiry results: char type, pointer. Number of Rows Returned: int type, the number of rows of the returned results. Number of Columns Returned: int type, the number of columns of the returned results. Return Value: int type, 1-Success, 0-Failed. Example: 588