你是使用dao吧,别的我不知道,这个我用过,但只能建access的数据库。
至于其他的数据库,我想应该有接口函数吧具体的用法找书吧这是例子CDaoDatabase m_LongDB; try
{
m_LongDB.Create(strLongPath);
}
catch(CDaoException* e)
{
return;
}
if(!m_LongDB.IsOpen())
{
AfxMessageBox("can't open the database");
} CDaoTableDef m_NewTable(&m_LongDB);
try
{
m_NewTable.Create("Data");
}
catch(CDaoException* e)
{
return;
}

m_NewTable.CreateField("Time",dbDate,dbDate);
m_NewTable.CreateField("Data",dbMemo,dbVariableField);

try
{
m_NewTable.Append();

catch(CDaoException* e)
{
return;
}
try
{
m_NewTable.Close();
}
catch(CDaoException* e)
{
return;
}