CDaoWorkspace::RepairDatabase
static void PASCAL RepairDatabase( LPCTSTR lpszName );
throw( CDaoException, CMemoryException );ParameterslpszNameThe path and filename for an existing Microsoft Jet engine database file. If you omit the path, only the current directory is searched. If your system supports the uniform naming convention (UNC), you can also specify a network path, such as: “\\\\MYSERVER\\MYSHARE\\MYDIR\\MYDB.MDB”. (Double backslashes are required in the path string because “\” is the C++ escape character.)ResCall this member function if you need to attempt to repair a corrupted database that accesses the Microsoft Jet database engine. You must close the database specified by lpszName before you repair it. In a multiuser environment, other users cannot have lpszName open while you are repairing it. If lpszName is not closed or is not available for exclusive use, an error occurs.This member function attempts to repair a database that was ed as possibly corrupt by an incomplete write operation. This can occur if an application using the Microsoft Jet database engine is closed unexpectedly because of a power outage or computer hardware problem. If you complete the operation and call the Close member function or you quit the application in a usual way, the database will not be ed as possibly corrupt.Note After repairing a database, it is also a good idea to compact it using the CompactDatabase member function to defragment the file and to recover disk space.For more information about workspaces, see the articleDAO Workspace in Visual C++ Programmer's Guide. For more information about repairing databases, see the topic "RepairDatabase Method" in DAO Help.
static void PASCAL RepairDatabase( LPCTSTR lpszName );
throw( CDaoException, CMemoryException );ParameterslpszNameThe path and filename for an existing Microsoft Jet engine database file. If you omit the path, only the current directory is searched. If your system supports the uniform naming convention (UNC), you can also specify a network path, such as: “\\\\MYSERVER\\MYSHARE\\MYDIR\\MYDB.MDB”. (Double backslashes are required in the path string because “\” is the C++ escape character.)ResCall this member function if you need to attempt to repair a corrupted database that accesses the Microsoft Jet database engine. You must close the database specified by lpszName before you repair it. In a multiuser environment, other users cannot have lpszName open while you are repairing it. If lpszName is not closed or is not available for exclusive use, an error occurs.This member function attempts to repair a database that was ed as possibly corrupt by an incomplete write operation. This can occur if an application using the Microsoft Jet database engine is closed unexpectedly because of a power outage or computer hardware problem. If you complete the operation and call the Close member function or you quit the application in a usual way, the database will not be ed as possibly corrupt.Note After repairing a database, it is also a good idea to compact it using the CompactDatabase member function to defragment the file and to recover disk space.For more information about workspaces, see the articleDAO Workspace in Visual C++ Programmer's Guide. For more information about repairing databases, see the topic "RepairDatabase Method" in DAO Help.
解决方案 »
- MFC有什么 方法可以获取CList列表中我选中了哪一行
- C++中 创建一个ACCESS表 数据类型为‘OLE对象’ 应该用什么类型啊
- 'CList' : too few template argument 错误,大虾指点。。。
- GroupBox边框颜色改变
- 傻傻的问:可以在按键的消息响应函数里调用OnDraw()吗?
- 优先级问题
- 如何使用免费网络资源,内详,来者有分,分数不够随时加~
- 怎样在编辑框控件中输出换行?
- 用CAsyncSocket进行网络数据发送/接受,数据包丢失的厉害,有什么方法可以解决?
- VC ++ 7.0中还有MFC么???
- 我有大把的分数贡献……
- 如何实现udp协议超时重发和包有序
dben.CompactDatabase(filename1,filename2,dbLangGeneral, dbVersion30);