Daily Archives: September 8, 2005

Pm v2.23

仍没有帮助,有时间的朋友可以帮我写,我目前是补不上了,没有时间
也没有中文界面,既然是帮助大家学英语的,界面上的这点英语不算什么大问题吧,
如果有英语错误请帮我指出来
 
v2.2.3 [Sep-08-05]
# fixed typing a dir path in destination dir of pm tools will activate the Apply button when selecting either the backup or the restore option.
+ new Phrase Memo v2 toolkit, functioning with rebuild, back up and restore backed databases.
 
v2.2.2 [Aug-26-05]
# recompiled QtGui4.dll, to fix a popup menu bug which make menu cannot show on the taskbar.
+ singleton support.
+ double clicking the tray icon will bring up the window.
+ added system tray support. Now minimizing behavior will cause the windows hidden into system tray.
* rearrange the context menu of text edit.
# fixed when reverse selecting an underlined text then move the cursor to unformated text, the underline button will not changed simultaneously.
# fixed the cursor still keeps visible changed to read only mode.
* the cursor keep in the same position on save
 
下载请到 http://503.mygis.org,进去后,进入tags/rls-mmdd/,mmdd表示build的日期,选择离现在最近的日期,进入该目录,请下载 *_setup.exe。如果需要验证其合法性,请下载*_setup_md5.txt,内含该可执行文件的md5 hash码。你如果认为你的朋友也能用,just feel free to distribute it.
用户密码按已知的来,没有的请给我写信 giscn_at_msn[dot]com
 

在qt里实现access数据库的compact和repair

增加2个#import,
#import "C:Program FilesCommon FilesSystemadomsado27.tlb" no_namespace rename("EOF","adoEOF")
#import "C:Program FilesCommon FilesSystemadomsjro.dll"
增加从QString到BSTR的转换函数
static inline BSTR QStringToBSTR(const QString &str)
{
 return SysAllocStringLen((OLECHAR*)str.unicode(), str.length());
以下主要代码,注意在srcConnection和desConnection不能指向同一个数据源。
//compact the db
 JRO::IJetEnginePtr jet(__uuidof(JRO::JetEngine));
 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
 QString srcConnection=QString("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%1;")
  .arg(dbqPath);
 QString desConnection=QString("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%1;")
  .arg(dbqPath+".tmp");
 jet->CompactDatabase(QStringToBSTR(srcConnection), QStringToBSTR(desConnection));
 bool renameError=false;
 if ( !QFile::rename(dbqPath, dbqPath+"k")) renameError=true;
  
 if (!QFile::rename(dbqPath+".tmp", dbqPath)) renameError=true;
    QApplication::restoreOverrideCursor();