FIX: ???? REPAIR_DB ???? ????? ??????? ?? Access 2000 ?????

???? ???????: 298145 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

???????

??? ??? ?????? ??????? API ODBC SQLConfigDataSource ?? ?????? REPAIR_DB ??? ??? ????? ?????? Microsoft Access ???? ??? ????? ????? ???????? ???? ???? ???? ????? ???????.

?????

??? ?? ????? ?? ????? Microsoft Jet ????? ODBC (Odbcjt32.dll) ???? ???? ?? Microsoft Data Access Components (MDAC) 2.5 Service Pack 2 ?????????? ???????.

????

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ?? Microsoft MDAC 2.5. ?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
293312INFO: ????? ?????? ??? ???? MDAC 2.5 ???? ???????
??? ?? ???? ?????? ?????????? ?? ??? ??????? ???? ??????? ??????? ?? ????:
   Date        Version      Size            File name      Platform
   ----------------------------------------------------------------
   12/04/2001  4.0.7412.0   270,608 bytes   Odbcjt32.dll   x86
				

???? ??????

??????? ?????? ??? ??? ??????? ?????? ?????? CDaoWorkspace::RepairDatabase ????? ????? ????????.

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ????? ??? ???????. ?? ????? ??? ??????? ???? ??? ?? Microsoft MDAC 2.5 ?????? ????? ?????? Service Pack 3.

??????? ????

???????? ???????? ??????? reproduces ???????:
void Repair(BOOL bEncrypt)
{
	CString strDBQ = "d:\\NWind.mdb", strSystemDB = "d:\\System.mdw";
	CString strAttributes;
	strAttributes += "REPAIR_DB=";
	strAttributes += strDBQ;
	if (bEncrypt)
		strAttributes += " ENCRYPT";  // This additional keyword is an optimistic try and has no effect!!
	strAttributes += "|";
	strAttributes += "SYSTEMDB=";
	strAttributes += strSystemDB;
	strAttributes += "|";
	strAttributes += "EXCLUSIVE=TRUE";
	strAttributes += "|";
	strAttributes += "|";

	// Exchange pipes against nulls so the command is interpreted correctly.
	for (int i = 0; i < strAttributes.GetLength(); i++)
	{
		if (strAttributes[i] == '|')
			strAttributes.SetAt(i, char(0));
	}

	BOOL b = SQLConfigDataSource(NULL, ODBC_CONFIG_SYS_DSN, "Microsoft Access Driver (*.mdb)",
		(LPCSTR) strAttributes);
	if (!b)
	{
		CString strErrorMsg;
		for (int i = 1; i <= 8; i++)
		{
			WORD cbErrorMsg;
			DWORD dwErrorCode;
			RETCODE r = SQLInstallerError(i, &dwErrorCode, strErrorMsg.GetBuffer(100), 100, &cbErrorMsg);
			if (r == SQL_NO_DATA)
				break;
			strErrorMsg.ReleaseBuffer(cbErrorMsg);
			TRACE("Rec: %d: %d, %x (%s)\n", i, r, dwErrorCode, (const char *) strErrorMsg);
		}

		AfxMessageBox("Repair failed!");
	}
	else
		AfxMessageBox("Repair succeeded!");
}
				

???????

???? ???????: 298145 - ????? ??? ??????: 22/?????/1426 - ??????: 3.2
????? ???
  • Microsoft Open Database Connectivity Driver for Access 4.0
  • Microsoft Data Access Components 2.1 Service Pack 2
  • Microsoft Data Access Components 2.5 Service Pack 2
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.5 Service Pack 1
????? ??????: 
kbmt kbhotfixserver kbqfe kbmdac250sp3fix kbjet kbmdacnosweep kbprb KB298145 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????298145

????? ???????