Jump to content

Gary

Members
  • Content Count

    128
  • Joined

  • Last visited

Everything posted by Gary

  1. Gary

    Detect record lock

    More correctly the DataSet could have other record locks, but the BeforeEdit would know the record in question. If not then instead of is DataSet.locked it would be if CurrRecord.Locked or the substance of.
  2. Gary

    Detect record lock

    Unlike Firebird/Interbase there is no Commit in MySQL(MariaDB), I think? I just tried editing a memo, then tried with a second connection - Time out started - then quickly canceled first edit and lock released - second edit good to go. Is it just not possible to do the following: procedure TdmPoolDetails.tblPoolsBeforeEdit(DataSet: TDataSet); begin if DataSet.Locked then begin Post record locked Message; Abort; end; end;
  3. Gary

    Detect record lock

    Thank You for your response. More info: I am not using transactions. The Uni example uses the Connection level lock and edits/Posts in code. That post had the same problems of waiting for a time out. They tried setting the lock type (lrimmedialty or IrDelayed) and still had problems. I would like to handle this at the DataSet level. I'm using data aware components, so for example (the real life big one) one user starts to edit a DBMemo component(They use this to log call conversations and service calls), another user try's to edit the same customer's memo. I want to notify the second user the record is locked for editing, not wait until they have added conversation notes and try to post the edit.
  4. Hello all, Where is the best place to discuss Spring4D? the Google groups has been down for some time
  5. Gary

    Delphi Registration

    I had the same problem a few years age, and now consider Delphi ransomware. When it happened, I was just going to go back to D7 but that license (CodeGear) would not work either. I ended up buying a new license (Pro version). I was contacted by a new Embarcadero rep when the renewal came due and found that the majority of the renewal price was premium support $500.00 I think, so now I just pay the $400.00 ransom each year. Shame on you Embarcadero!
  6. Gary

    Saving multiple listbox items to db

    You iterate over the items, check if it's checked if it is, save it to your table for var i := 0 to (FileListBox1.Items.Count - 1) do begin if FileListBox1.Selected[i] then begin // save item to table FileListBox1.Items[i] end;
  7. Gary

    Saving multiple listbox items to db

    Use the TCheckListBox.Selected Property Here is an example from the documentation: https://docwiki.embarcadero.com/CodeExamples/Alexandria/en/FileListBox_(Delphi)
  8. Gary

    Paserver Macincloud

    Hello all, Looking forward to the upcoming Bootcamp, so I thought I'd finally set up Mac OS. I have an older IMac 2012 Catalina that was given to me, no go. XCode requires Monterey. I opened a trial account at MacInCloud their support page says all plans Managed and Pay-As-You-Go come with PaServer installed. I am a total newbie with Mac, still search as I may, I cannot find it on the machine. Can anyone using MacInCloud instruct me in how to start PaServer. Thank You, Gary
  9. Gary

    Paserver Macincloud

    I sent email to them and they added it. Don't know why they advertise it as already installed if you have to request it.
  10. Your book couldn't have come out at a better time for me! As a hobbyist I wrote my first commercial application for a friend about 3 years ago the old RAD way. I have been adding features and fixing bugs since then. As expected, I now have a big ball of mud. I had just started refactoring when the book was published. Every Delphi book I have purchased has paid for itself with even 1 tip, this was no different. I have found many useful suggestions in particular section 13.6.6 Arrays vs Cases. I had to laugh at myself reading 2.3.1 "the developed application looks as though the developers never saw a component they didn't like." CHECK
  11. Gary

    sqlmemtable

    DEVART UniDac components have TVirtualTable, Dataset that stores data in memory and TVirtualQuery Dataset that allows to use SQL statements to retrieve data from in-memory datasets or simultaneously from several different RDBMS'es. I haven't used them in a production project, but I do use them constantly to simulate DataSets in tests. I used to use TClientDataSet but TVirtualTable has an AutoInc field that TClientDataSet does not and most of my tables do. Component List (devart.com)
  12. You can also add popup menu's to the data module and they will be visible in the form as well. I use David's suggestion with global data module and popup connected to action list for my data grids, then assign the grids popup property at runtime depending on the grid shown. If I want to change or add functionality it's done in a single place.
  13. From Delphi Twain - scan documents with Delphi (kluug.net) Windows 10, Delphi 11 Hello all, When I run the sample vcl1 in the debugger I get a EZCompressionError here. if Assigned(FTwain.SelectedSource) then begin try // Load source, select transference method and enable FTwain.SelectedSource.Loaded := TRUE; // display interface FTwain.SelectedSource.ShowUI := TRUE; // Scan FTwain.SelectedSource.Enabled := TRUE; except on E: EZCompressionError do { TODO : Nothing, does not effect. Investigate, caused by FTwain.SelectedSource.Loaded & FTwain.SelectedSource.Enabled } end; end; Anyone else get this? Any fix? Also I need to get the scanner resolution used. I tried this: var lReturn : Extended; var lValues : TTwainResolution; var lResult : TCapabilityRet := FTwain.SelectedSource.GetIYResolution(lReturn, lValues); but the return value is crUnsupported on a newer Canon Color Image Class laser printer. Is there another way to get the selected resolution? Thanks, Gary
  14. Hello All, I am making some changes to an app that has been running for a little over 2 years. I have a MySQL DB with an attachments table that stores filenames, the actual files are in a shared folder on the same computer. The full path had been stored, now the path is in a settings table where it can be changed and only the filename in the attachments directory. To test it I have 2 computers with the database and attachments stored, the path in the settings table is of course different on each computer. All is well and I was ready to update it when I tried to run the client app from my laptop. All is well accessing one computer, but not on the other. When loading the form that deals with the files I do a check to make sure I have a valid directory DirectoryExists(AttachmentsDir), if not I show a message and close the window. This returns false for the second computer, it does work fine from my desktop. So it must be an access issue but I have tried the following with no joy: Confirm the laptop has access to the shared directory, I have a mapped drive that access it no problem, I can type the path just as it is passed to DirectoryExists into File Explorer and no problem there as well. I ran the program as administrator and still no access. The client has 4 users in it all day and a couple other occasional users, they have no problem with access currently, but I know that if this can happen here it WILL happen as soon as I update their copy. BTW the file server is a simple Windows 10 PC with a local network no outside access. Any ideas?? Thanks in advance Gary
  15. More info.. Seems VPN not the problem. It is only blocked if I run from IDE. So app is fine running outside of Delphi, good enough for me.
  16. Problem solved! Coming back to the laptop my BitDefender prompted me to turn the VPN back on, leaving it off everything is good, turn it on I get restricted. I went back to desktop, turned on VPN and it still connects. The Desktop is wired, the laptop is on wifi though. Why would only this app be blocked though? I can still access the folder with file manager and pdf reader with the VPN on. I thought, maybe the DirectoryExists() function could possibly be the problem, but commenting it out and letting the form load then selecting a file to open fails as well. I use ShellExecute to try to open the files with the users default app since the attachments can be different file types. No exceptions are raised, it just does nothing.
  17. The second computer has only 1 user, yours truly. I can access the share no problem through an already existing mapped drive or just by typing the address into the file manager. So the computer\user has access. As I said I even tried starting the app as administrator. Most of the attachments are .pdf files, so I tried opening from my reader, no problem, even typing \\DellT310\users\public in the file open dialog will open the public directory. Why would the other app be restricted? The path has to be correct (no spelling errors) since it is read from the Database and the other computer accessing the same database has no problem??
  18. Hello all, Deployment works fine on 1 machine but above error on other. Here is what I have tried/done: I made sure all files are included and in right directories. I uploaded folder to my local NAS drive then copied the same folder to 2 different computers, neither has any development environment installed. Both computers have Microsoft C++ 2012 redistributable installed(One suggestion said it was required). I tried both 32 and 64 bit. Both 32 and 64 run fine on 1 computer, the other gives error(either ibtogo.dll or ibtogo64.dll). Since the one works fine the problem shouldn't be any missing files or license issues. Any suggestions on what may be missing or interfering?
  19. Gary

    cannot load client library ibtogo.dll

    Yes, all are in folder I copied over. That was Interbase last chance. Switched to Firebird 4.0, all is well.
  20. Anyone else getting this error when using Raize components Del[phi 11 [dcc32 Fatal Error] Unit1.pas(7): F2051 Unit RzCommon was compiled with a different version of Vcl.Forms.TCustomForm
  21. Thanks Lajos. I should have searched first!
  22. Hello all, I just installed Delphi 11 along with the developer edition of Interbase. All worked fine until I tried connecting from Delphi 10.4. After trial and error I found that both installations create a developer_ib2020 instance. However each version uses it's own location path and the other cannot connect to this instance. C:\Program Files (x86)\Embarcadero\Studio\21.0\InterBase2020 for 10.4 and C:\Program Files (x86)\Embarcadero\Studio\22.0\InterBase2020 for Delphi 11. So after installing Delphi 11 the Interbase Server Manager root directory is C:\Program Files (x86)\Embarcadero\Studio\22.0\InterBase2020, and connections from Delphi 11 work fine, but not from Delphi 10.4 If I load Delphi 10.4 and reinstall Interbase the Server Manager root directory is C:\Program Files (x86)\Embarcadero\Studio\21.0\InterBase2020, and now connections work from Delphi 10.4 but not Delphi 11. How do I go about installing Interbase Developer so that I can connect from either version? I did find an article that Error: Unavailable Database (embarcadero.com) and Changing InterBase connection defaults in RAD Studio (embarcadero.com) but no Joy.
  23. If you skipped the Interbase install, does firedac connect to the databases in Data Explorer or did you need to modify them? If not then that is the way to go! My question about server instances had to do with the install I did of the standalone DB. It asked if I wanted multiple instances, I said yes and was able to set up 2 different ones. I was hoping it was possible to do this at any time not just during install. My intent was to set up instances using different paths in hopes that it would fix the problem. Turns out I just needed to use TCPIP. Still, installation is able to set something inside the IDE so that it can use the local protocol. That should be configurable somewhere.
  24. David, My sentiments exactly! However I must have missed something because if you select Interbase as a feature when installing you are never asked setup questions and it just overwrites the developer_ib2020 settings, as well as setting IDE environment variables. This of course could be all me. I just let the installer do it's thing and ended up with this situation. If I had experience with Interbase maybe I could have installed it differently. Maybe I shouldn't have selected Interbase when installing Delphi 11 since it was already on the machine? Maybe the install would have picked this up, or it may not have even been necessary at all, I could just have used the TCPIP settings in Delphi 11. I see you have multiple server instances in IBConsole. How did you set them up? One of my attempts to solve my problem, I downloaded the separate install of Interbase, and could create separate instances during the install, but I can't see any way to do that later. Thank you for the response Gary
  25. Hans, My Apologies, it does work if I leave the port number blank. BTW I am trying to connect from the IDE, should have mentioned that. I simply add a FDConnection (or Unidac Connection) to a form and try connecting to the sample data, nothing fancy. So the last IDE to install Interbase can set protocol to "local" and leave server blank, but to work on any other version you need to use tcp/ip. That applies to the connections in the Data Explorer as well. I had to modify each connection. That's great! Thank you. The last article in my original post talked about the install setting up IDE, I did find 2 environment variables dealing with Interbase but adjusting them had no effect. Still it must be possible to adjust the IDE to your preferred locations so they work as intended (protocol = local)
×