updating oE 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.

  1. key : an object, the record key, which uniquely identifies it inside the current table
  2. data : an object, associated to key.
  3. table_name : optional table name to insert record into

An integer, either DB_OK on success or an error code on failure.


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:

db_replace_data, db_delete_record

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu