如题
解决方案 »
- 如何从技术层面防止死锁(求大牛)
- win32下,如何删除ini文件中的某一键值?
- hash算法修改及错误 能解决的进270分
- 想自学3D游戏编程,用的是VC和DIRECTX,推荐一下有什么好的书籍
- 多文档结构,Doc怎么访问App的数据?
- (大侠们帮帮看看)同时连接两个数据源为什么运行的时候会出错?(回答后马上给分)
- 有关于OLE的app.CreateDispatch("Excel.Application")调用失败的原因
- 假设有个叫做“请输入密码”的窗口,其中包含有两个“Edit”控件,具体情况如下:
- CTreeCtrl右键点击选中不准的问题!
- ***********************菜鸟问题,在VC中如何动态实现控制对话框?
- 新的一年快到了,建议大家结贴啦.
- 十万火急!!!!如何在一个视窗内加载一个ActiveX控件,在dialog已加载成功??
Visual C++: Compacting an Access Database via ADO
Besides #import, the Msado15.dll (MDAC2.1), add the following #import statement to generate the wrapper classes for JRO to your .cpp classes (alternatively, you can generate the wrapper classes more efficiently by using the no_implementation and implementation_only attributes of the #import pre-processor statement):
#import "C:\PROGRAM FILES\COMMON FILES\System\ado\MSJRO.DLL" no_namespace
Add the following (specifying your own source and destination database paths) to the .cpp file where you want to compact the database:
...
try
{
IJetEnginePtr jet(__uuidof(JetEngine));
jet->CompactDatabase(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\\nwind2.mdb",
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\\abbc.mdb;" \
"Jet OLEDB:Engine Type=4");
}
catch(_com_error &e)
{
::MessageBox(NULL, (LPCTSTR)e.Description( ), "", MB_OK) ;
}
NOTE: The Jet OLEDB:Engine Type=4 is only for Jet 3.x format MDB files. If this value is left out, the database is automatically upgraded to the 4.0 version (Jet OLEDB:Engine Type=5). See the following table for appropriate values for Jet OLEDB:Engine Type:
Jet OLEDB:Engine Type Jet x.x Format MDB Files
1 JET10
2 JET11
3 JET2X
4 JET3X
5 JET4X
#import "C:\PROGRAM FILES\COMMON FILES\System\ado\MSJRO.DLL" no_namespace
后生成的接口描述头文件出现这样的问题
__missing_type__ ConflictTables;
错误:'__missing_type__': missing storage-class or type specifiers
请问这是怎么回事?怎么解决?