简体   繁体   中英

delphi clientdataset filtering strange behaviour

Working in XE5 Delphi. For a given ClientDataSet this filter is working: Strap LIKE '18%'

but this one do not: Strap LIKE '1%' . Meantime Strap LIKE '%8' works fine, but Strap LIKE '%18' do not. The Strap field has a string type, always with 17 characters (never empty).

Every time the error is a (windows) "c0000005 access violation" , but this is non-sense since, however, Strap LIKE '%18%' or Strap LIKE '%1%' or Strap LIKE '%8%' ALL works fine. Definetely the data exist, and the program HAS access to them. When the error appears the stack holds on the midas.dll , but this is registered and works fine with other filter patterns.

Same behaviour for ALL fields in the dataset. Filter patterns as 'x%' or '%xx' do not work (where x is ONE character), all others work.

What is happening?

If during installation of Delphi XE5 you have choosen to install the old and ugly BDE, it will install you an old midas.dll library (date 8/9/2002) on system directory (check Windows\\system32 or Windows\\SysWOW64 depending on 32 or 64 bits Windows)

You must replace (or better delete) this old midas.dll and use the right version which comes with Delphi. You will find it at the Program files (x86)\\embarcadero\\rad studio\\12.0\\redist\\win32 directory.

midas.dll是一个自我注册的dll,因此是首次注册,无论您是否将其包括或复制到应用程序的同一目录中,都必须从系统中替换每个旧的midas.dll或在Windows中签入注册的注册表

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM