Deletes the data area.
bool
i5_data_area_ delete (string
name, [, resource
connection])
Parameters
name |
Name of the data area.
|
connection |
Connection – result of i5_connect |
Return
True if OK, false if failed.
I5_ERR_PHP_HDLDFT |
256 |
No default connection found. |
I5_ERR_PHP_HDLCONN |
257 |
This resource has no connection active. |
I5_ERR_PHP_RESOURCE_BAD |
261 |
No resource found. |
I5_ERR_PHP_TYPEPARAM |
262 |
Type of element x in parameter -1 must be y. Type z was provided. |
I5_ERR_PHP_TYPEPARAM |
262 |
Type of element x in parameter -1 must be y. Type z was provided. |
I5_ERR_PHP_NBPARAM_BAD |
263 |
Wrong parameter count |
I5_ERR_PHP_EMPTY_NAME |
314 |
Object name can not be empty |
Example
$ret = i5_data_area_create ("QTEMP/MYDTA" , 50);
if (!$ret) trigger_error("i5_data_area_create error : ".i5_errormsg(), E_USER_ERROR);
$ret = i5_data_area_write ("QTEMP/MYDTA" , "MSG:Hello Word");
if (!$ret) trigger_error("i5_data_area_write error : ".i5_errormsg(), E_USER_ERROR);
$ret = i5_data_area_read ("QTEMP/MYDTA", 1, 4);
if (!$ret) trigger_error("i5_data_area_read error : ".i5_errormsg(), E_USER_ERROR);
echo "Type data: $ret<BR>" ;
$ret = i5_data_area_read ("QTEMP/MYDTA");
if (!$ret) trigger_error("i5_data_area_read error : ".i5_errormsg(), E_USER_ERROR);
echo "Message: $ret<BR>";
$ret = i5_data_area_delete ("QTEMP/MYDTA");
if (!$ret) trigger_error("i5_data_area_delete error : ".i5_errormsg(), E_USER_ERROR);