| |||||||
| Windows XP Discuss the Microsoft Windows XP Operating System |
![]() |
| | LinkBack | Thread Tools |
| |||
| MDAC/ADO, XP/SP2 and Regional and Language Options Hi, There is a history of misteriously 'damaged' MDAC/ADO under XP/SP2, so the simple code that uses ADO queries (like this below) fails: AnsiString TDiMainForm::GetDBVer() { AnsiString Ver = ""; ADOQuery->Close(); ADOQuery->SQL->Clear(); ADOQuery->SQL->Add( "select top 1 * from TblVer" ); AnsiString CS = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + ChangeFileExt( ParamStr(0), C(IDS_SER_MAIN_MDB) ) + ";Mode=Read;Persist Security Info=False"; ADOQuery->ConnectionString = CS; try { try { ADOQuery->Open(); Ver = ADOQuery->FieldValues["Ver"]; } catch ( const Exception &e ) { //ShowMessage( "GetDBVer Error" ); } } __finally { ADOQuery->Close(); } return ( Ver ); } After lots of investigation, I've found that this is happening because of settings in Regional and Language Options, which SP2 do not 'like': SP2 does not like 'Bosnia and Herzegovina' as sufix. Control Panel > Regional and Language Options > Regional Options --- Standards and Formats --- For example, this stops ADO to work: Serbian (Latin, Bosnia and Herzegovina) Choosing anything other: Serbian (Latin), or English (United States) works. --- Location --- Haven't tested, but I suppose that this also has to be corrected. In other words, this is not desirable for programs that uses ADO: - Serbian (Cyrillic, Bosnia and Herzegovina) - Serbian (Latin, Bosnia and Herzegovina) This is desirable: - Serbian (Cyrillic) - Serbian (Latin) This problem is also known with one version of famous SiSoft Sandra. That's how I discovered this problem, which I was complaining some time ago. -- Best Regards, Vladimir Stefanovic |
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regional option--locale and language group missing | hitchhiker | Windows XP | 0 | 01-04-2007 04:19 AM |
| Re: Windows XP SP2 and MDAC | evon | Windows XP | 0 | 01-04-2007 03:57 AM |
| Minor vista bug - country missing from Regional and Language optio | Thepeacekepr | Windows Vista | 0 | 01-01-2007 09:31 PM |
| Region and Language options | Mike S. | Windows XP Tablet PC Newsgroup | 3 | 03-14-2005 08:15 AM |