SynopsisAdd a schema to the module-internal schema database. Prototype#include "emfdb.h" int dbRegisterDBSchema(char_t * tablename, schemaTable_t * sTable); Parameters
DescriptionThis function creates an empty table in the web server database module. Tables are defined by means of the following schema structure: typedef struct schemaTable_s { int nColumns; char_t **columnNames; int *columnTypes; int nRows; int **rows; } schemaTable_t; nColumns - the number of columns in the table This function does NOT exist in the EMF database module. Return ValuedbRegisterDBSchema returns 0 if successful, or -1 on error. ExampleschemaTable_t stable; sTable.nColumns = 3; sTable.columnNames = {T("USERID"), T("PASSWORD"), T("GROUP")}; sTable.columnTypes = {T_STRING, T_STRING, T_INT}; /* The remaining elements of the schema table are not used */ nCheck = dbRegisterSchema(T("USERS"), &sTable); See AlsodbOpen(), dbClose(), dbLoad(), dbSave() |