If you are using Access's .mdb database, you can use CDAODatabase :: Create to create a database, then use CDaotableDef :: Create to create a table, use CDaotableDef :: CreateField to add a table's data field. The CDaotabledef :: CreateField section of VC can find definitions of various fields.
Here is an example of establishing a table:
CDAODATABASE DAODB; TRY {DAODB.Open ("MyServer // MyShare // MYDIR / / MYDB.MDB"); CDaotableDef Table (& DAODB); Table.create ("Students"); Table.createField ("ID", DBINTEGER, 2); table.createfield ("name", dbtext, 10); table.Append ();} catch (cdaoException * e) {afxMessageBox (e-> m_perrorinfo-> m_strdescription); E-> delete (); return false }