updating oE db_insert
db_insert
include eds.e namespace eds public function db_insert(object key, object data, object table_name = current_table_name)
inserts a new record into the current table.
Parameters:
- key : an object, the record key, which uniquely identifies it inside the current table
- data : an object, associated to key.
- table_name : optional table name to insert record into
Returns:
An integer, either DB_OK on success or an error code on failure.
Comments:
Within a table, all keys must be unique. db_insert will fail with DB_EXISTS_ALREADY if a record already exists on current table with the same key value.
Both key and data can be any Euphoria data objects, atoms or sequences.
Example 1:
if db_insert("Smith", {"Peter", 100, 34.5}) != DB_OK then puts(2, "insert failed!\n") end if
See Also:
Not Categorized, Please Help
|