dm_db_set_application_id Function

public function dm_db_set_application_id(db, id) result(rc)

Set the 32-bit signed big-endian “Application ID” integer located at offset 68 into the database header.

Applications that use SQLite as their application file-format should set the Application ID integer to a unique integer so that utilities such as file(1) can determine the specific file type rather than just reporting “SQLite3 Database”. A list of assigned application IDs can be seen by consulting the magic.txt file in the SQLite source repository.

The function returns the following error codes:

  • E_DB_PREPARE if statement preparation failed.
  • E_DB_STEP if step execution failed or no write permission.
  • E_READ_ONLY if database is opened read-only.

Arguments

Type IntentOptional Attributes Name
type(db_type), intent(inout) :: db

Database type.

integer, intent(in) :: id

Application id.

Return Value integer


Calls

proc~~dm_db_set_application_id~~CallsGraph proc~dm_db_set_application_id dm_db_set_application_id interface~dm_itoa dm_itoa proc~dm_db_set_application_id->interface~dm_itoa sqlite3_finalize sqlite3_finalize proc~dm_db_set_application_id->sqlite3_finalize sqlite3_prepare_v2 sqlite3_prepare_v2 proc~dm_db_set_application_id->sqlite3_prepare_v2 sqlite3_step sqlite3_step proc~dm_db_set_application_id->sqlite3_step

Called by

proc~~dm_db_set_application_id~~CalledByGraph proc~dm_db_set_application_id dm_db_set_application_id proc~dm_db_open dm_db_open proc~dm_db_open->proc~dm_db_set_application_id proc~dm_db_backup dm_db_backup proc~dm_db_backup->proc~dm_db_open