23 #include <ndb_global.h>
42 #define CHECK_DB_CALL( Call ) \
43 CheckDbCall( Call, #Call, __FILE__, __LINE__ )
53 char EMP_TABLE_NAME[] =
"employees";
57 CFG_DbColumnDesc_t EmpColDesc[] = {
58 {
"first_name", CFG_DB_CHAR, PCN_SIZE_OF(
Employee, FirstName ),
60 {
"emp_no", CFG_DB_INT, PCN_SIZE_OF(
Employee, EmpNo ), PCN_TRUE },
61 {
"last_name", CFG_DB_CHAR, PCN_SIZE_OF(
Employee, LastName ),
69 CFG_DbColumnBinding_t ColBindings[] = {
70 CFG_DB_BINDING(
"last_name", CFG_DB_CHAR,
Employee, LastName ),
71 CFG_DB_BINDING(
"emp_no", CFG_DB_INT,
Employee, EmpNo ),
72 CFG_DB_BINDING(
"first_name", CFG_DB_CHAR,
Employee, FirstName)
77 { 1242,
"Joe",
"Dalton" },
78 { 123,
"Lucky",
"Luke" },
79 { 456,
"Averell",
"Dalton" },
80 { 8976,
"Gaston",
"Lagaffe" }
92 CFG_DbOpen( &DbName ) ;
93 CFG_DbCreateTable( EMP_TABLE_NAME,
94 EmpNbCol, EmpColDesc );
96 CFG_DbTableExists( EMP_TABLE_NAME );