-2

I use TCLientDataSet often to store local data, using the SaveToFile and LoadFromFile methods.

Everything always worked fine, but somehow now it has stopped to work. When i call SaveToFile method, no exception is generated, BUT nothing is saved as well.

This problem started after i did some tests deleting the 'MIDAS.DLL' file from my app path, but even after i returned it to the path, the problem persists.

Any hints ?

delphirules
  • 6,443
  • 17
  • 59
  • 108
  • 1
    In your Delphi Source folder, find the unit DSIntf.Pas. Put a breakpoint in the first line of CheckDBClient and trace through it when your app executes. That will tell you whether it's using the copy of Midas.Dll that you think it is and whether it is being loaded correctly. – MartynA Aug 22 '15 at 14:06
  • 2
    Or just add`Midaslib` to your uses clause, and remove the need for the DLL entirely. – Ken White Aug 22 '15 at 14:20
  • The problem of adding Midaslib in my case is my EXE is encrypted with ASprotect, to make things harder to crackers and somehow when i add Midaslib, APP crashes after protecting. – delphirules Aug 22 '15 at 15:00
  • @KenWhite If I recall, people have experienced issues when using `Midaslib` which don't exist when using the DLL. For example: http://stackoverflow.com/questions/15449386/midaslib-dcu-makes-the-application-slower – Jerry Dodge Aug 22 '15 at 15:00
  • @Jerry: I've used it since it was made available (D2006?) without issue, and I've never distributed the DLL. If you run into that sort of issue, then consider not using MidasLib. Until you *do* hit the issue, why burden yourself with the unnecessary dependency? – Ken White Aug 22 '15 at 15:25
  • @KenWhite Well, when you have software like ours which has 15+ Executables and 5+ DLL's which all use a Client Dataset, the DLL really comes in handy. Plus I'm not sure if said issues have been fixed in later versions. – Jerry Dodge Aug 22 '15 at 15:28
  • @Jerry: OK, so you have a need to deploy the DLL. The poster wrote *to store local data*, and there's no indication of multiple applications or other DLLs to deploy. When you have a need to do something, do it. It's just not wise to only think that your need makes the solution appropriate for everyone else. – Ken White Aug 22 '15 at 15:59
  • @Ken Of course not, that's why I was commenting my opinion, just like you posted yours - rather than an answer. And I wasn't asking poster to do anything, just recalling seeing peoples' pains using `Midaslib` in the past. Only reason I mentioned multiple applications is because you had responded to my comment. – Jerry Dodge Aug 22 '15 at 16:01

1 Answers1

0

I don't know what happened or why, but after i selected my clientdataset on design time and click again on 'Create dataset' the problem got solved.

delphirules
  • 6,443
  • 17
  • 59
  • 108