你说的C++是指 C++builder 吗?下面的语句可以创建一个MDB类型的数据库
AnsiString sql2 = " create table 数据 \
( \
ID int identity not null, \
dz varchar(50) null, \
xm varchar(50) null, \
)";
AnsiString sql1 = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password=123;Data Source=dataname +".mdb";
AnsiString sql6 = "Provider=Microsoft.Jet.OLEDB.4.0;JetOLEDB:Database
Password=123;Data Source= dataname +".mdb; Persist Security Info=False";
Variant xx=CreateOleObject("ADOX.Catalog");
xx.OleFunction("Create",sql1.c_str());
ADOQuery1->ConnectionString = sql6;
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add(sql2);