db_insert
| Definition: | integer i = db_insert(object key, object data) |
| Description: | Insert a new record into the
current table. Both key and data can be any Euphoria
data objects, atoms or sequences.
Returns DB_OK (0) on success. |
| pwa/p2js: | Not supported |
| Comments: | Within a table, all keys must be unique. db_insert() will fail with DB_EXISTS_ALREADY if a record already exists with the same key value. |
| Example: |
if db_insert("Smith", {"Pete", 100, 34.5})!=DB_OK then
puts(2, "insert failed!\n")
end if
|
| See Also: | db_find_key, db_record_key, db_record_data |