Jump to content

alogrep

Members
  • Content Count

    157
  • Joined

  • Last visited

Everything posted by alogrep

  1. Hi. Madexcept shows a leak on this part of my code: TBlobField(FieldByname('image')).SavetoStream(Stream); var Stream: TMemoryStream; .... Stream:=TMemoryStream.create; TBlobField(FieldByname('image')).SavetoStream(Stream); if Stream.Size > 0 then begin FindGraphicClass(Stream.Memory^, Stream.Size, GraphicClass); ..... ///// end; Stream.free; end; Anybody knows that is wrong with my code?
  2. Ok this is (a bit modified ) code with dm2,memfloorobjects do begin setit(memfloorobjects,'no'); edit; BlobStream:=TnxBlobStream(memfloorobjects.CreateBlobStream(fieldbyname('image'),bmRead)); try if TnxBlobStream(BlobStream).Size > 0 then begin FindGraphicClass(BlobStream, BlobStream.Size, GraphicClass); TnxBlobStream(BlobStream).Position := 0; b:=Tbitmap.Create; b.LoadFromStream(TnxBlobStream(BlobStream)); //line with leak??? try try Image.Picture.assign(b); except on E:SysUtils.Exception do begin if debughook <> 0 then showmessage(inttostr(picno)+' '+E.message); end; end; finally b.free; end; end; finally TnxBlobStream(BlobStream).free; cancel; end; end; Madexcept says that object created there on thah line with ??? leaked. Why? I did free it.
  3. Thanks. But Madexcept list the line number of TBlobField(FieldByname('image')).SavetoStream(Stream);
  4. alogrep

    2 errors that do not exist?

    Hello. Delphi 11.2 I have 2 "errors" that show in this page (see errors.jpg). Yet the project builds and runs ok. I can not decipher the nature of the (false alarm?) errors. One is this (see error2.jpg) The declaration of nxcheck is this: type Tnxcheck = class(TForm) nxSimpleSession: TnxSimpleSession; nxRemoteServerInfoPlugin: TnxRemoteServerInfoPlugin; l1: TListBox; nxsock: TnxWinsockTransport; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } public { Public declarations } function ison(s: string): boolean; end; var nxcheck: Tnxcheck; implementation ..... Why create(nil) yields "too many actua parameters"? I have dozenns of create(Nil) in =other places, with no error . The other is shown in error1.jpg. I can't figure what operator is supposed to be missing here. Any help, please?
  5. alogrep

    2 errors that do not exist?

    Thanks to everybody. It all disapperad, by itself. I guess "Error insight" was the culprit.
  6. HI. It appears that Nexusdb fórums treat any question about data replication as if were radioactive. Nobody touches it. I hope some courageous soul would look at this scheme of data replication to another PC (PC2) on the same LAN . Maybe I am way off: if so an answer “Yes, you are way off” would suffice Have 2 identical data modules, DM1 with aliaspath pointing to the working directory, and DM2 with aliaspath pointing to a backup directory on another PC and running on a separate thread. The datasets in both DM's are identical. I also have a unit (Unit0)accessible to both data modules where I store some variables and structures/records. Each table has a field NOT autoinc "DR" wich is a unique number identifying each record, and an index based on it. I put A) a "GlobalBeforePost" on each table in DM! which saves the dataset state (dsEdit or dsInsert), the record buffer and the "DR" value to Unit0, B) a "GlobalAfterPost" on each table in the first data module (DM1) which calls a function in Unit0. The pseudo code in the function in Unit0 is: Retrieve the dataset state and "DR" If state = dsEdit then begin If not Findkey(DR]) then Raise error End else Append Retrieve record buffer and copy it to the corresponding table in DM2 Post. The entire operation is inside a starttransaction /commit/except. If this scheme is somewhat feasible, I have 2 questions: 1. Could there be a conflict if 2 users at the same time attempt to update the same table? 2. How do you Save/Copy a record buffer?
  7. Hi. Has anyone experienced this error trying to access Registerd Users Download "error an existing connection was forcibly closed by the remote host" Is the site down, or there is (suddenly) a problem in my PC? THanks
  8. Thanks. That link did not work for me. But this works: https://my.embarcadero.com/#downloadsPage
  9. alogrep

    Delphi 11.2 and Tpngobject.

    Hi all. I have installed version 11.2 and now I get error at runtime with buttons that have a pngobject. In the Form the image shows. In the object inspector it does show Tpngobject, and a click on it shows the miniature image. but at runtime it shows that the picture graphic is not assigned. Perhaps there is a new Pngcomponents.dpk required for version 11.2> Uwe Raabe. any ideas?
  10. alogrep

    Delphi 11.2 and Tpngobject.

    Thanks again Uwe. (I amd converting a very large project and I need a couple of months more of compatibility betweenXE and legacy Delphi) When I put RegisterOldPngFormat in Conditional defines of the App and I build I get this error: [dcc32 Fatal Error] POS.dpr(1): F1027 Unit not found: 'System' or binary equivalents (.dcu) The .dcu created by pngcomponents package are in C:\hmxe\png\PackagesAlexandria\Win32\Release. I tried to add this directory to the search path, but I get the same error.
  11. alogrep

    Delphi 11.2 and Tpngobject.

    Thanks, Uwe Please, note: I re-downloaded https://codeload.github.com/UweRaabe/PngComponents/zip/refs/heads/master and re-installed and re-build the packages. Design.jpg shows what I see at design time. Formcreate.jpg shows that the picture.graphic "disappeared": NIL Error.jpg show the error I obviously (since graphic "disappeared") get.
  12. alogrep

    Delphi 11.2 and Tpngobject.

    Uwe Raa, hi. I use the PngComponents you suggested to me. the Alexandria package. all worked ok with version 11.15, after I installed ver 11.2 (Delphi) it broke.
  13. alogrep

    Delphi 11.2 and Tpngobject.

    François Piette i get AV b/c the image.picture..graphic is Null. Yet at design yime the image shows ok.
  14. alogrep

    "Home made" data replicaion with Nexusdb

    HI frost.brutal. Do you have the link to "what I read on Firebird forum from a guy that develops universal FB replicator"? Basically what I need is a solution to this scenario. I have a database and the database management server on PC1, connected over the LAN to various PCs. In the LAN there is also a PC101 which has a copy of the database manager server (inactive) and should have in real time the same data that are stored in the database on PC1. If PC1 fails, the administrator would activate the server on PC101 and the clients would automatically change the alias path to that of PC10! so the user can continue to work normally.
  15. alogrep

    "Home made" data replicaion with Nexusdb

    Maybe I took the wrong term (replication). What I would Like to do is something like mirrored drives, but not with 2 drives on the same PC, rather the mirrored drive on another PC on the LAN.
  16. alogrep

    "Home made" data replicaion with Nexusdb

    Thanks. "Anyway Nexus doesn't seem the good choice for this. There are plenty of opensource DB's which have replication out-of-the-box" I agree, but that is feasible if you start a new project. But if you have an app with hundreds of thousand lines of code it would be unbearable.
  17. Hello Vandrovnik. It is armv8 should be 64bit. Mybe the problem is that the processor is Mediatek Helio?
  18. Thank you vry much Dave. It worked fine!
  19. Hello. Everytime one updates Delphi, a calvary begins . I had a perfect function 11.0. I made the latest update, and nothing works any longer. I get these errors: [dcc32 Error] system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc' [dcc32 Error] system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcfree' [dcc32 Fatal Error] Vcl.GraphUtil.pas(416): F2063 Could not compile used unit 'System.ZLib.pas' Does anybody have any idea of how to fix this? I also noticed that when in the IDE I often get an error thats says that it cannot save zlib.pass to the "_recovery" folder. I got one result to my search that says that that maybe due to a third party component that uses zlib.pas , but I cannot find any component that does it. Besides, here it says that is Vcl.GraphUtil.pas that cannot be compiled b/c zlib is messed up.
  20. I re-installed for the 4th time. Before the installation, I removed any 22.0 directory reference. Now I get the error Could not compile used unit 'nxdb' nxdb is the Nexusdb unit (I have the DCU only version ) The nxdb is here Directory of C:\ProgramData\NexusDB\NexusDB4\Library\Delphi11\Win32 17/12/2021 02:48 p. m. 612,434 nxdb.dcu 1 File(s) 612,434 bytes I have C:\programdata\NexusDB\NexusDB4\Library\Delphi11\Win32 in the library path as well as in the project search path. Why does it want to compile the dcu? I tried to check and unched the Use debug .dcu's, but I get the same result. What else can I do?
  21. Hello. Here I am. Back to square 1. I removed thre previous installatiion of 11.1, I removed all directories. I re-installed Delphi. The unit scopes are the same as before. And I get the same rerror that I was gettig before (see attached image s1.jpg). The compiler messages output is in the attached errors.txt. All dcu's in C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win32\debug show the original date as they were included in the installation exe. I am over_super_completely lost. errors.txt
  22. Thanks Uwe. I spoiled my weekend. C:\programdata\NexusDB\NexusDB4\Library\Delphi11\win32 I put that because that is where Nexusdb put its dcu's.
  23. Oops. Use I thinnk I did a foolish thing. I deleted not only from win32 (as you SAID) but also from the win64! I guess the only thing now is to re-install delphi? Unit not found: 'System' or binary equivalents (.dcu)
  24. Once I remove the Source directory from the library, I get these errors when building the project (attached errors.txt). errors.txt
  25. I have this in unit scope name (se attached (us.jpg). And in both places these are the lines (Under inherit values from Base in Unit scope Names, and in the top editable list in Values form All configurations) System;Xml; Data;Datasnap; Web;Soap; Vcl; Vcl.Imaging; Vcl.Touch; Vcl.Samples; Vcl.Shell
×