Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Hi Dmitry, thank you for reply. To be honest in my last project i have not any field setted with autoincrement. Do you have any idea on how to create an autoinc field via runtime? (trigger and generator?) Thank you Daniele
  3. Brian Evans

    "Divided by zero" exception

    Consider when code using unmasked exceptions calls code in a DLL that uses masked exceptions. The floating-point control register (FPCR) needs to be set to mask exceptions just before the call then unmask them on return. The functions provided by Delphi to update the FPCR are not thread safe so they can botch it. For the non-FMX Windows platform Delphi code ran with unmasked floating-point exceptions on by default before the recent change. Most C/C++/C# code runs with them masked. This meant the above scenario happened when calling into most non-Delphi DLLs from Delphi.
  4. Remy Lebeau

    Drag Drop via Ole

    That code risks pointer truncation in a 64bit build. The integer typecast should be using NativeUInt or UIntPtr instead. Or, use pointer arithmetic via PByte instead. Also, the file list is a double-null terminated list, so make sure you account for that in case multiple files are dragged. Also, depending on the source, the file names may be using Ansi or Unicode characters, so pay attention to the DropFiles.fWide field.
  5. Remy Lebeau

    "Divided by zero" exception

    https://docwiki.embarcadero.com/RADStudio/Athens/en/What's_New#Disabling_Floating-Point_Exceptions_on_All_Platforms
  6. Mark Williams

    10.4 installation issues

    I've moved to a new laptop running Windows 11. I installed from the downloaded ISO. I'm missing the help files. When I go into Manage Platform (to try and switch off dark mode), I am told that setup cannot continue due to a corrupted installation file. How can I get the help files please and is there a way of fixing the corrupted file?
  7. Does "rewriting" include changing the database or SQL? Or are you simply upgrading to a newer version of Delphi? @Dmitry Arefiev is correct that the problem is that "AUTO_CORRECT" is not a recognized keyword in Interbase. @Lars Fosdal is also correct that it can be emulated. My point is that your problem is not with Delphi, it's with the SQL, which leads me to question what all you're doing in the rewrite.
  8. Today
  9. omaroski

    App doesn't start - Library missing

    Hi Patrick, didn't ask for their support yet. OS is Sequoia and i've tried on macincloud service too (runs Sonoma) but same thing happens.
  10. It seems you can emulate auto increment, using a trigger and a generator?
  11. direktor05

    Drag Drop via Ole

    ha ha, ok I'll bite you
  12. Anders Melander

    Drag Drop via Ole

    Bite me
  13. direktor05

    Drag Drop via Ole

    In my code the file list is not filled: FileName := PWideChar(Cardinal(DropFiles) + DropFiles.pFiles); where DropFiles comes from WinApi.ShlObj - which means the file list is not being transferred from Windows on IDropTarget.DragEnter IDropTarget.DragEnter is called but the file list is empty.
  14. direktor05

    Drag Drop via Ole

    You could also tell me your idea of "example of working around the UAC restrictions " so I don't have to go through your non-working code.
  15. direktor05

    Drag Drop via Ole

    Not very professional! Doesn't work at all!
  16. I suppose the TSQLConnection uses the DataSnap Driver. Then it is better to change TSQLConnection.Driver.CommunicationProtocol from default tcp/ip to http. TCP/IP connections are fragile over wifi. EDIT: CommunicationProtocol is in TSQLConnection.Params but can be changed also from TSQLConnection.Driver in object inspector.
  17. direktor05

    Drag Drop via Ole

    Is this component made only for Delphi up to 2011? How about Delphi 11?
  18. terran

    "Divided by zero" exception

    It wasn't enough for them to have undefined behavior in C that you decided to put it in Pascal? OLE objects are not common use. Don't know anything about thread-safety and mask at every call. Why not mask once if you need this? Again, whose fault is it that "FPCR" (what's that?) is still not thread-safe? Okay, customers will no longer complain about "zero divide" exceptions, but they also will not complain about "not catched" exceptions either, because they will not notice them, for the time being. SO it's a win-win strategy.
  19. Clayton A. Alves

    Old Window border style on Delphi MDI child form

    Thank you all for the answers. I guess the only viable solution, without updating to Delphi 12, is to custom draw the frame.
  20. Although, I just had to check because I thought it was a little old... are you sure the listing is right? 10.14 Mojave is an Intel OS released 2 years before the M1 machines. I'd expect it to be macOS 11 Big Sur at a minimum.
  21. Any Mac with Apple Silicon chips (M1, M2, etc.) can be upgraded to the latest macOS 15 Sequoia. Running that with Windows in Parallels should be fine for Alexandria (or Athens) — it's what I use. Just make sure you get a machine with plenty of RAM. Remember, the RAM in Apple Silicon Macs is all on-chip, so not upgradeable, and you will be running Windows on top of macOS. Although, I just had to check because I thought it was a little old... are you sure the listing is right? 10.14 Mojave is an Intel OS released 2 years before the M1 machines. I'd expect it to be macOS 11 Big Sur at a minimum. And... a MacBook Air are a little lightweight. It will run what you want but probably not as nippy as you'd hope for when under load.
  22. I am a Delphi developer and am using Delphi Alexandria. I want to create few MAC FMX applications. I have tried MacInCloud but it is too slow. I want to purchase a MAC instead which is affordable. I have found MacAirbook M1 Chip, macOS 10.14 Mojave within my budget. My worry is that the Mac should not be too old and incompatible with Delphi Alexandria
  23. Rollo62

    Why Aren't You Using SQLite?

    Sqlite can be used in large, production-ready sites, you could have a look what Pieter Levels does with Sqlite, PHP, JQuery only, like back to the roots. https://news.ycombinator.com/item?id=23359023 https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.youtube.com/watch%3Fv%3DB-_P0d1el2k&ved=2ahUKEwjJxILl-PuIAxXFSPEDHTKKOr8QtwJ6BAgKEAI&usg=AOvVaw0ESb4TJ_wTRTzhSmsFX7ot
  24. InterBase does not support "AUTO_INCREMENT".
  25. Good morning to all, i have a very strange problem working with FireDac rewriting an old project written with Delphi XE and recompiled with Delphi10.3 In short, the program save user and connection data on a table in a mobile device, the saved data are used to establish a database connection to a remote server. Here the procedure i use to create database and tables Const DataBaseName = 'TestDB.ib'; TabellaConnessioni = 'TabellaConnessioni'; TabellaUtenti = 'TabellaUtenti'; procedure Test Var SL : TStringList; SqlStr : string; I : Integer; Begin DBPath:= TPath.GetDocumentsPath; DBPath := DBPath + PathDelim + 'interbase' + PathDelim + DataBaseName; // Con1 is FireDac FDconnection Con1.Params.Values['Database'] := DBPath; Con1.Params.Values['CreateDatabase'] := 'True'; Con1.Params.Values['OpenMode'] := 'ReadWrite'; Con1.Open; // Try to create tables SL:=TStringList.Create; FXDati.Con1.GetTableNames('','','',SL); if FileExists(Con1.Params.Database) then begin SL:=TStringList.Create; FXDati.Con1.GetTableNames('','','',SL); if SL.Count=0 then begin SqlStr:=''; SqlStr:='CREATE TABLE ' + TabellaConnessioni + ' ('; SqlStr:=SqlStr + 'RecordID Int AUTO_INCREMENT,'; SqlStr:=SqlStr + 'NomeConnessione CHAR(255),'; SqlStr:=SqlStr + 'IPAddress CHAR(255),'; SqlStr:=SqlStr + 'Port Int,'; SqlStr:=SqlStr + 'DataCreazioneRecord DATE'; SqlStr:=SqlStr + ')'; FQ.SQL.Clear; FQ.SQL.Add(SqlStr); FQ.ExecSQL; // Error // Creo il DB degli utenti abilitati ... SqlStr:=''; SqlStr:='CREATE TABLE ' + TabellaUtenti + ' ('; SqlStr:=SqlStr + 'RecordID Int AUTO_INCREMENT,'; SqlStr:=SqlStr + 'Utente CHAR(255),'; SqlStr:=SqlStr + 'Password CHAR(50),'; SqlStr:=SqlStr + 'ConnessionePreferita Int,'; SqlStr:=SqlStr + 'DataCreazioneRecord DATE'; SqlStr:=SqlStr + ')'; FQ.SQL.Clear; FQ.SQL.Add(SqlStr); FQ.ExecSQL; end else begin // Aggiungo tabelle nuove o campi nuovi alle tabelle esistenti .. for I:=0 to SL.Count - 1 do SqlStr:=SL[I]; end; FreeAndNil(SL) end; FreeAndNil(SL) End; The DB is created and i try to create tables but when i try to execute the first sql query i get this error: Project VM75AndroidClient2.apk raised exception class EIBNativeException with message '[FireDAC][Phys][IB]Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 47 AUTO_INCREMENT'. and i'm not able to create table(s). In FDConnection sql dialect is set to 3, driver used is IB and all the others properties are as defaut. As last information, i set permission with one component called MobilePermission (https://github.com/adrianosantostreina/MobilePermissions or getit) and set the default permission. To be honest these procedures used in Delphi 10.3 procedure DisplayRationale(Sender: TObject; const APermissions: TArray<string>; const APostRationaleProc: TProc); procedure CheckPermissionRequestResult(Sender: TObject; const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>); does not works anymore because change something. Now i'm using delphi 11.3, all help is absolutely wlcomed. Thank you all can give me some help ...
  26. MMSoft

    Mouse cursor

    Thanks, it works. I'm now going to try to incorporate it into my own Project. Edit: Is it possible to make a keyboard appear when the magnifying glass is clicked (Search on the site) so that search text can be typed ? Edit2: It now also works in my own App (and it runs on an Android TV). I do come across points for improvement, such as showing a keyboard when there is an input field. But also if the site does not fit on the Web browser to be able to scroll it. Also, if the site has shifted on the WebBrowser, clicking on it will no longer work because this shift will probably have to be taken into account.
  27. Dave Nottage

    Mouse cursor

    The jar is not added to the search paths, it's added to the Libraries node of the Android 32-bit target, as per the demo readme. This is an image (which has been shortened, for brevity) of it: You don't add those paths. See above.
  1. Load more activity
×