Jump to content

Search the Community

Showing results for tags 'delphi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 295 results

  1. Goal: I have configured my app to be opened by some links in iOS, like myapp://lala (using custom scheme), or https://myapp.com/c/lala using universal links, and is already opening my app, but i need to know which url that opened my app. (There is even a tutorial in FMX Express) Problem: I'm trying to handle incoming url from my ios app unsuccessfully. On iOS this should be done by capturing event TApplicationEvent.OpenURL like: procedure TipUrlHandler.ApplicationEventMessageHandler(const ASender: TObject; const AMessage: TMessage); begin case TApplicationEventData(TApplicationEventMessage(AMessage).Value).Event of TApplicationEvent.OpenUrl: HandleUrl(TiOSOpenApplicationContext(TApplicationEventData(TApplicationEventMessage(AMessage).Value).Context).URL); else end; end; Mas o TApplicationEvent.OpenUrl nunca é chamado. So I checked the class TApplicationDelegate in the unit FMX.Platform.iOS.pas in which the TApplicationDelegate.applicationOpenURLWithOptions function should be called every time the app is opened by a url as Apple documents: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623112-application?language=objc class function TApplicationDelegate.applicationOpenURLWithOptions(self: id; _cmd: SEL; application: PUIApplication; url: Pointer; options: PNSDictionary): Boolean; So I went to check if the applicationOpenURLWithOptions method is being added correctly in TApplicationDelegate.CreateDelegateMetaClass: class procedure TApplicationDelegate.CreateDelegateMetaClass; begin ... // Opening a URL-Specified Resource if TOSVersion.Major >= 9 then class_addMethod(DelegateClass, sel_getUid('application:openURL:options:'), @applicationOpenURLWithOptions, 'B@:@@@@') else ... end; And then I was able to prove it wrong! The number of arguments declared is wrong, as the correct one should be B@:@@@ Then I made the modification to FMX.Platform.iOS.pas, being as follows: class procedure TApplicationDelegate.CreateDelegateMetaClass; begin ... // Opening a URL-Specified Resource if TOSVersion.Major >= 9 then class_addMethod(DelegateClass, sel_getUid('application:openURL:options:'), @applicationOpenURLWithOptions, 'B@:@@@') else ... end; But the TApplicationDelegate.applicationOpenURLWithOptions function is not yet called. What is wrong? @EDIT Sorry! It is working for custom schemes like "myapp://lala" (with or without the correction in FMX.Platform.iOS.pas) but it is not working for universal links like https://myapp.com/c/lalala. Although I have already configured the universal link correctly and when I click on this universal link, the iOS open my app, but the url can't be handle with TApplicationEvent.OpenUrl, but I discovered that the handling of incoming url of a universal link is different: Handling Universal Links
  2. Under Android 16 only (build BP3A.250905.014), the App crash when call the BindService : 09-22 11:18:52.956 10948 10948 E AndroidRuntime: FATAL EXCEPTION: main 09-22 11:18:52.956 10948 10948 E AndroidRuntime: Process: com.XX.YYY, PID: 10948 09-22 11:18:52.956 10948 10948 E AndroidRuntime: com.embarcadero.rtl.NativeDispatchException: Erreur d'invocation : méthode 'onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;Landroid/app/IBinderSession;)V' introuvable 09-22 11:18:52.956 10948 10948 E AndroidRuntime: at com.embarcadero.rtl.ProxyInterface.dispatchToNative(Native Method) 09-22 11:18:52.956 10948 10948 E AndroidRuntime: at com.embarcadero.rtl.ProxyInterface.invoke(ProxyInterface.java:20) ... The application already available in app stores was working, but since the system update and without any changes, it crashes. The Delphi location demo application with a service also crashes in the same way. Perhaps the problem is that the declaration is : void onServiceConnected(ComponentName name, IBinder service) instead of for Android API 36 : void onServiceConnected(ComponentName name, IBinder service, IBinderSession session) ? Does anyone else have the same problem, and if so, is there a solution?
  3. Hi everyone, I’ve been a long-time reader here, and I wanted to share a project I’ve built using Delphi 12 (Athens) to ask for some technical feedback. The Project: It’s called Finvo, an offline invoicing software designed for freelancers. The Tech Stack: I aimed to keep it robust and native, so I chose: Framework: FireMonkey (FMX). Database: SQLite via FireDAC (for zero-config local storage). Reporting: FastReport for generating invoice PDFs. Connectivity & Backend: Client-side: Used RESTRequest4Delphi to handle license activation and retrieve license details. Server-side: The backend REST API is built using Horse. UI/UX: Used LiveBindings extensively for populating grids and tables. Implemented a search feature using the standard TEdit combined with a Timer (to create a delay/debounce effect while typing). Used ZigButton for custom styling. Platform: Currently targeting Windows. Although FMX is cross-platform, I don't own a Mac machine, so I haven't been able to compile or test the macOS version yet. Development Strategy (MVP vs Perfectionism): I still have a backlog of features and reports that I plan to add. However, I decided to pause adding new features for now to focus on getting visibility and gathering real user feedback first. Honestly, I am not sure if this is the right strategy. Part of me thinks I should have been a "perfectionist" and included everything before the initial release, but I didn't want to code in a vacuum forever. The Challenge: I am trying to prove that native desktop apps can still compete with web-based SaaS tools in 2025. I have managed to list the app on platforms like AlternativeTo, Product Hunt, Softpedia, Gumroad, G2, and SoftwareSuggest. My Question for the Community: For those who develop desktop tools with Delphi: Do you recommend the "Release Early, Release Often" approach for desktop apps, or should the first version be feature-complete? Do you rely solely on the "Store" model (Microsoft Store), or do you find distributing independent binaries (Setup.exe) still viable for SEO and trust? (Note: To respect the community rules regarding self-promotion, I have not included a direct link. However, if you are interested in the UI implementation, you can find "Finvo Invoice" via search engines or on the platforms mentioned above.) I’d appreciate any feedback on the tech stack or the release strategy!
  4. I have an e-scooter that I use for riding around towns and trails. There is an app to download. However, that app does not connect to my scooter and the developer is slow to fix/resolve/respond and still does not connect. So, I would like to look into writing my own app for my phone (android) to do the following: 1. track start and end times 3. track my routes - where i've been or stopped at 4. show the miles I am traveling during my ride in real-time 5. show the total miles of my ride 6. possibly show speed (via calculation) and in real-time 7. eventually, to show a map of my route in real-time, and show all my stops Is this possible with Delphi 11.2 and free components/services/API's ?
  5. Is there such a utility or power-tool for Windows 7/10 that adds a feature to the explorer to add coments too a folder? Or maybe a delphi code snippet to do something like that? For instance, when you are in explorer, and viewing files, you can right-click the folder and add a meaningful comment to it. Then, later on you can hover your mouse over it and a pop-up baloon with the comment shows. I need something like this for my programming projects. I have lots of them, but over time I forget where I was at in them. Did this app work? Was it borked. Is it incomplete? And so on. I could right little tid-bit reminders to help me when I'm viewing project folders, say, a months to a year later.
  6. I want to bring up TIdIMAP4 file into Delphi 12.2 Athens IDE. Is there an easy way to do this? Thanks..
  7. Hi everyone, In my project, I’m trying to update all the places where we display images using the TImage component to use the WICImage property instead, in order to improve display performance. However, I’m facing the following issue: I want to display a PNG image without its background using WICImage, but from what I’ve found, it seems I can’t interact with the alpha channel to achieve this. Does anyone have any recommendations? Delphi 12
  8. Hello, I have a problem and I don't know what I'm missing. I send a GET-Request to a server, in this case https://www.google.de, and i would like to verify the server certificate. This works if my client doesn't load an own certificate. After loading an own, I get the error message "unable to get local issuer certificate" in TsslHttpCli.onSslVerifyPeer. Does anyone have any idea what's going wrong here? Here's my source: unit Unit1; // Simple Test-Client, based on which sends a GET-Request to a Google-Server via https-Protocol. // Shall verify the certificate of the Google-Server. // Only works, if I don't load an own certificate for the client. // If I do, I will get the error message "unable to get local issuer certificate" in SslVerifyPeer. interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, System.TypInfo, System.DateUtils, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, OverbyteIcsTypes, OverbyteIcsSslBase, OverbyteIcsWndControl, OverbyteIcsHttpProt, OverbyteIcsLogger; type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure FormCreate(Sender: TObject); private MyClient: TSslHttpCli; procedure LogMyClient(Sender: TObject; LogOption: TLogOption; const Msg: String); procedure SslVerifyPeer(Sender: TObject; var Ok: Integer; Cert: TX509Base); procedure SslHandshakeDone(Sender: TObject; ErrCode: Word; PeerCert: TX509Base; var Disconnect: Boolean); procedure Info(Text: string); procedure Error(Text: string); end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Info(Text: string); var dt: string; begin DateTimeToString(dt, 'd.m.yyyy hh:nn:ss.zzz', Now); Memo1.Lines.Add(dt + ' [INFO] ' + Text); end; procedure TForm1.Error(Text: string); var dt: string; begin DateTimeToString(dt, 'd.m.yyyy hh:nn:ss.zzz', Now); Memo1.Lines.Add(dt + ' [ERROR] *********' + Text + '*********'); end; procedure TForm1.FormDestroy(Sender: TObject); begin MyClient.RcvdStream.Free; MyClient.Free; end; procedure TForm1.FormCreate(Sender: TObject); var CertFileName: string; ChainResult: TChainResult; CertString, ErrStr: string; bLoadOwnCert: Boolean; begin ReportMemoryLeaksOnShutdown := (DebugHook <> 0); MyClient := TSslHttpCli.Create(nil); MyClient.RcvdStream := TMemoryStream.Create; MyClient.SslContext := TSslContext.Create(MyClient); MyClient.OnSslVerifyPeer := SslVerifyPeer; MyClient.OnSslHandshakeDone := SslHandshakeDone; MyClient.IcsLogger := TIcsLogger.Create(MyClient); MyClient.IcsLogger.OnIcsLogEvent := LogMyClient; // MyClient.IcsLogger.LogOptions := [loWsockErr, loWsockInfo, loProtSpecErr, loProtSpecInfo, loProgress, loSslErr, loSslInfo, {loSslDevel, loSslDump,} loDestEvent]; MyClient.IcsLogger.LogOptions := [loWsockErr, loProtSpecErr, loSslErr, loDestEvent]; MyClient.SslContext.UseSharedCAStore := TRUE; // Without that: No Server Cert Check MyClient.SslContext.SslVerifyPeer := TRUE; Info('CAStoreTotal: ' + MyClient.SslContext.GetCAStoreTotal.ToString); // 0 Info('RootCAStoreTotal: ' + IcsSslRootCAStore.Count.ToString); // 311 // Load own Certificate. bLoadOwnCert := TRUE; if bLoadOwnCert then begin CertFileName := 'maleben********_dyndns_org.pfx'; // also tried pem-bundle. MyClient.SslContext.SslCertX509.LoadFromFile(CertFileName, croTry, croTry, 'pass1234'); end; // Validate Certificate Chain ChainResult := MyClient.SslContext.SslCertX509.ValidateCertChain('', IcsSslRootCAStore, CertString, ErrStr); { really need host name, V9.1 new store } case ChainResult of chainOK: Info('chainOK, CertString: ' + CertString); // I get chainOK chainFail: Info('chainFail, Error: ' +ErrStr + ', CertString: ' + CertString); chainWarn: Info('chainWarn, Error: ' +ErrStr + ', CertString: ' + CertString); chainNone: Info('chainNone, Error: ' +ErrStr + ', CertString: ' + CertString); end; end; procedure TForm1.SslVerifyPeer(Sender: TObject; var Ok: Integer; Cert: TX509Base); begin Info('SslVerifyPeer, Received certificate: Subject: ' + Cert.SubjectOneLine + ', Issuer: ' + Cert.IssuerOneLine); if OK <> 1 then Error('SslVerifyPeer, Error msg: ' + Cert.VerifyErrMsg); end; procedure TForm1.SslHandshakeDone(Sender: TObject; ErrCode: Word; PeerCert: TX509Base; var Disconnect: Boolean); begin Info('SslHandshakeDone, PeerCert.VerifyResult= ' + PeerCert.VerifyErrMsg); Info('SslHandshakeDone, PeerCert.Sha256Hex=' + PeerCert.Sha256Hex); if ErrCode = 0 then Info('SslHandshakeDone, OK') else Error('SslHandshakeDone, SslHandshake failed, error #' + IntToStr(ErrCode)); end; procedure TForm1.LogMyClient(Sender: TObject; LogOption: TLogOption; const Msg : String); var lop: string; begin lop := GetEnumName(TypeInfo(TLogOption), Integer(LogOption)); Info('IcsLog: ' + lop + ' ' + Msg); end; procedure TForm1.Button1Click(Sender: TObject); var Len: Integer; Text: Ansistring; begin Info('********** Button1Click **********'); try MyClient.URL := 'https://www.google.de'; Info('Send Get-Request: ' + MyClient.URL); MyClient.Get; Info(MyClient.RcvdHeader.Text); Len := MyClient.RcvdStream.Position; if Len > 0 then begin SetLength(Text, Len); MyClient.RcvdStream.Position := 0; MyClient.RcvdStream.ReadData(@Text[1], Len); Info(string(Text)); end; except on E: Exception do Error(E.Message); end; end; end.
  9. Chris Pim

    TTimeEdit picker time format

    Hi everyone Does anyone know if it's possible to force the time picker of TTimeEdit to be 12 or 24 hours? I mean the actual picker in iOS itself, not the editor box (which you can manipulate using the "Format" property). By default, the picker matches the time format set in the phone settings, but I have a separate time format setting in my app which determines whether we show am/pm or 24 hour format in the app and I'm trying to make the experience consistent for my users. Thanks
  10. I've been wondering about this for some time and now I need to iterate over the strings to view them but I can't when using TStrings. And the only way to do it is to create a temporary TStringList var and assign the TStrings over to it. Then, I can step through the list to observe what is going on during debug. It seems like extra work to me. Anyway. See below for ex of how I have to create the extra work. It is not the actual code but just an example of some of it. function inlist(myts: tstrings): tstringlist; var tsL: tstringlist; begin myts := tstrings.create(self) tsL := tstringlist.create; tsL.assign(myts); . . s:=s; // <-- debug breat point result.assign(tsL); tsL.free; end; procedure TForm1.btn3Click(Sender: TObject); var ts: tstrings; begin ts := tstringlist.create; ts := inlist(memo1.lines) . . ts.free; end; In tstringlist, there is a FList that holds the strings. I searched in tstrings but there is none. Surely, tstrings is storing the strings somewhere. I just need to know where so I can view them during debugging. Does anyone know where tstrings stores the strings?
  11. Mandy.Rowlinson

    Error Handling in an application

    I’m using Delphi 10.4 Sydney. What’s the best way to implement error handling that captures and displays the full call stack (including exact line numbers) and lets users submit an error report—complete with the application version and stack trace—to our support team?
  12. Anna Blanca

    Can't change icons in my app

    Hi. I'm trying change icons of my Android app, and i made all as earlier - on the way Project>Option>Application>Icons. I changed all Embarcadero's default icons to my icons. But when i compile my app, i see all the same app icons in my phone. What's wrong i made?
  13. Dear visitors, We like to inform you that new version of NextSuite6 is released. Click here to read the release news. We also like to remind you that our 35% is available until the end of the month. Click here for Online Store and Prices . NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component. Next Collection 6 - A set of smaller components that are both useful and easy to use. Next Canvas Application - a drawing application that wysiwyg convert your drawings into a valid Delphi TCanvas code.   and many more.  Few screenshots:      Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip Boki (BergSoft) [email protected] | LinkedIn Profile -- BergSoft Home Page: www.bergsoft.net Members Section: users.bergsoft.net Articles and Tutorials: help.bergsoft.net (Developers Network) -- BergSoft Facebook page -- Send us applications made with our components and we will submit them in news article. Link to this page will be also set on home page too.
  14. I'm getting these errors in the log when running RAD Studio 12.3 for the first time to install packages and run Delphi Community Edition... [2025-08-04 09:20:23] [DEBUG] GetIt: 2025-08-04 09:20:12 - Error on loading data from the server getit12new.embarcadero.com: Internal Server Error [2025-08-04 09:20:23] [DEBUG] GetIt: 2025-08-04 09:20:12 - Error when loading "Platforms": [500] Error on loading data from the server getit12new.embarcadero.com: Internal Server Error [2025-08-04 09:20:23] [DEBUG] GetIt: 2025-08-04 09:18:53 - Error on loading data from the server getit12new.embarcadero.com: Error sending data: (12007) The server name or address could not be resolved [2025-08-04 09:20:23] [DEBUG] GetIt: 2025-08-04 09:18:53 - Error when loading "Platforms": [-102] Error on loading data from the server getit12new.embarcadero.com: Error sending data: (12007) The server name or address could not be resolved I've tried everything to check if it is on my side, fixed my PATHs (the lengths were too long, the installer said), installed and reinstalled... So, are the servers completely down, or is it something on my side?
  15. Hello everyone, My name is Andry RALIJAONA, I am a software developer based in Antananarivo, Madagascar, with more than 26 years of experience in software development, mainly with Delphi. Throughout my career I have worked both as a freelancer and as an in-house developer, often in remote setups, for clients in France, Switzerland, Belgium, and Madagascar. My main expertise includes: Desktop application development with Delphi Modernization of legacy code and migration to recent Delphi versions Database design and administration: SQL Server, PostgreSQL, SQLite, MySQL, Interbase, Advantage Database Reporting & BI: Crystal Reports, FastReports, Power BI, Power Query Automation: VBA, data processing tools System & server administration (Windows) What I am looking for I am open to remote collaborations as a Delphi developer, especially in: Developing new desktop or client/server applications Enhancing or maintaining existing software Migrating legacy Delphi systems to newer versions Integrating external services, databases, and reporting solutions If you have a project where my experience could add value, feel free to get in touch. 📧 [email protected] 📞 +261 34 77 297 27 CV ANDRY - ENG.docx
  16. Manuel S.

    Bootable Service not start using Kastri

    Hi, I want to create a service that starts at boot. Register a broadcast receiver that can intercept the ACTION_PACKAGE_ADDED event. I'm using Kastri with Delphi 12.3 and Android 15, but the service doesn't start. I'm attaching my manifest file. Thanks. AndroidManifest.xml
  17. Hi From the contacts I have from time to time following presentations or training courses, it seems that I'm better known for the video game coding part of my hobby than for the other stuff. It's true that I find it more fun (especially to stream on Twitch), but I also have utilities for Delphi developers created to simplify my life that I make available as binaries and source code on my GitHub account. App Stores Screen Captures Generator : to generate all the needed images from your screen captures when you have to publish your softwares on current app stores Copyright Pascal Projects : to add a copyright text in the header of each PAS/DPR files of a folder tree DProj To Windows Setup : to generate the Windows setup from Delphi deployment wizard data. It uses Inno Setup to create the install program and Exe Bulk Signing to sign the exe files. Exe Bulk Signing : a local and network signing program for Windows executables (exe+msix). It has an API you can use to integrate it in your projects like I did with "DProj To Windows Setup". Folder to FMX Image List : to create a FireMonkey TImageList to copy paste in your project or in a data module unit from all images in a folder tree. It fills the multires bitmaps depending on file names. Google Play Developer Banner Generator : to create a picture to use has your Play Store developer banner composed by a random collage of images you add to your project. I use it with icons of my Android apps. HTML Writer : to simply get HTML source code or WYSIWYG HTML content. I use Delphi HTML Components library in this program to have the WYSYWYG HTML editor and a memo for the source code tab item. Pic Mob Generator : my icons generator from basics layers or images, SVG, paths or rectangles. It export JPEG&PNG images, ICO and ICNS files. For the SVG I used RiverSoftAVG SVG Component Library, but next release will use Skia4Delphi. SM Code Generator : I use it in some multi players games, for EXE Bulk Signing API and client projects. The program generates Delphi code you only have to use in your projects to have a client / server solution to exchange formatted messages over IP. The library uses standard TCP sockets from Embarcadero (with no external dependencies). SVG Folder to Delphi Unit : to import SVG files as Pascal strings in your projects. I use it in some games with Skia4Delphi to show icons or sprites. The program generates a unit (compatible with Delphi 12.X and higher) with SVG found in a folder. Some of these programs are available from GetIt. The others will be submitted before the end of the year. The download links are on their GitHub repositories and will be added to their websites (which should be redirected to GitHub in the meantime). If you need changes in these programs or have suggestions, be free to tell here or as issues on their repositories. I'm also looking for ideas of simple tools to develop during live coding streams to show Delphi or web solutions. They are distributed as shareware programs. Contributions and sponsoring are welcome but not obligatory, and there are no program restrictions in the absence of a valid license. All features are available for free.
  18. Visualize complex multi-dimensional data using #TeeBI Composer control. Minimal code, automatic output. https://github.com/Steema/TeeBI/tree/master/demos/delphi/Visualization/Composer
  19. ⚡️Dear Delphi Developers Community, I'd like to share an open job opportunity for developers in Germany. 👀We are actively seeking a highly qualified Delphi Developer with demonstrated expertise in Delphi programming, as well as proficiency in SQL and experience with ERP systems. This is a full-time, permanent position at a company that specializes in the production of automotive software, located in the Hannover region. The option for remote work, accompanied by periodic visits to the office, may be considered based on the candidate's demonstrated professional qualifications. Proficiency in both spoken and written German is required, with a minimum level of B2. 🖥If you’re interested or know someone who might be a good fit for this role, please feel free to reach out to me on LinkedIn (https://lnkd.in/duRBttdZ) or reach out via email ([email protected]). Thank you!
  20. Hello everyone! Together with the Softacom team, I have been exploring how AI can support Delphi projects. As part of these experiments, we created a video showing how to use OpenAI features to generate text, images, and speech via an Embarcadero Delphi FMX app. If you are curious how these APIs can be integrated into your Delphi workflow, check out our video. I hope you will find it useful! Watch the video: If you prefer reading, we have article versions too: Generate text with GPT: https://www.softacom.com/blog/development/text-generation-capabilities-with-delphi-fmx-application-via-openai-api-gpt-models/ Create images using DALL·E: https://www.softacom.com/blog/development/image-generation-capabilities-with-delphi-fmx-application-via-openai-api-dall·e-models/ Convert text to speech with OpenAI API (TTS-1 and WHISPER-1 models): https://medium.com/@softacom.com/speech-and-text-by-speech-generation-capabilities-with-delphi-fmx-app-via-openai-api-tts-1-and-b19293070588
  21. I was wondering. . . Is there any apps (for Windows) that can retrieve all comments from a given Youtube video ? And how quickly can it be received ? And, has anyone used it or uses it currently ? I've been wanting to download or extract Youtube comments for a number of purposes. What I'm looking for is how *fast* can comment's be retrieved, not how to do it myself. I've written a few code snippets to pull it once I have a video in view and it can be very tedious, especially when there are replies and when the comments are in the thousands. And sometimes I can't read them on screen because there are too many and/or I run out of memory or something. I'm wondering how people are doing it without issues and how fast they can pull thousands.
  22. Delphi Version: 12.2 Athens Database: SQL Server Driver: FireDAC MSSQL Query Type: Live TFDQuery, UpdateOptions.UpdateMode := upWhereAll Context: Migrating from BDE with many legacy TFloatField components Problem Summary When FireDAC’s FormatOptions.MapRules are configured to map BCD and FMTBCD fields to Double, FireDAC mishandles actual FLOAT database fields during auto-generated UPDATE statements. Specifically, it generates a WHERE clause where the FLOAT field is incorrectly bound as decimal(22,20) — causing loss of precision and failed row matching. Reproduction Conditions SQL Server table contains: pop_density FLOAT NULL Delphi TFDQuery includes: A persistent TFloatField bound to this column. UpdateOptions.UpdateMode := upWhereAll FormatOptions.MapRules contains: MapRules.Add(dtBCD, dtDouble); MapRules.Add(dtFmtBCD, dtDouble); (This is necessary to preserve compatibility with hundreds of legacy TFloatField components from a BDE application.) The float value in the database is something like 1.23456789123E-10. FireDAC generates the following: exec sp_executesql N' UPDATE dbo.unit SET ... WHERE ... AND pop_density = @P5', N'@P5 decimal(22,20)', 123456789123 The float value is bound as a decimal, stripping both the decimal point and exponent — resulting in no match. Observations This does not occur in a small test app unless MapRules are set. OldValue of the field is correct and contains the scientific notation. Field class is TFloatField. Problem only arises when MapRules include rules to map to dtDouble. Workarounds Use UpdateOptions.UpdateMode := upWhereChanged to avoid the float field being used in the WHERE clause. This breaks the "another user changed the row" functionality. Avoid setting MapRules globally. Would require upgrading every persistent TFloatField. Manually override update SQL via TFDUpdateSQL. High effort. Legacy applications contain a large number of live queries using persistent TFields. Why This Matters This is a blocking issue for anyone migrating a BDE-based application where all numeric fields were defined as TFloatField (common BDE behavior). Using FireDAC’s MapRules to redirect BCD types to Double is a clean workaround — but this side effect breaks updates on real FLOAT columns. Problem has also been observed on database fields defined as NUMERIC. Conclusion FireDAC's parameter binding logic incorrectly applies decimal formatting to native SQL Server FLOAT fields and sometimes NUMERIC fields when MapRules redirect BCD/FMTBCD to Double — even if the persistent field is explicitly a TFloatField. Would appreciate any insights or confirmation from others facing this during BDE → FireDAC migration. EDIT: The issue only seems to occur when the value in the float field uses a negative exponent greater than 6. For example, the problem occurs when the float = 1E-07, but not 1E-06. I have attached a small test program that demonstrates the problem, with a SQL file to build the test table and add a couple of data rows. If I modify any value in the row containing 1E-07 in the pop_density column, I get the error: [FireDAC][DApt]-400. Update command updated [0] instead of [1] record. test.zip
  23. Hello, Masters. I appreciate your help in advance. All of my production apps have stopped receiving notifications on iOS. They only start working again when the user uninstalls and reinstalls the app, which generates a new token that works correctly, both in Firebase Messaging tests and in notifications sent from my server. It seems that the previously generated tokens are no longer valid. Is there a way to force the app to generate a new token without requiring it to be uninstalled? Additionally, what is the best approach to handle users who already have the app installed in production, considering there are several hundred of them?
  24. I'm trying to figure out how to retrieve the contacts from outlook from a specific list. for example, I have been able to get the address lists: and now I want to select one of those items (offline global address list, for instance) and get all the contacts/emails from that specific list. I am having no luck working that part out. any help?
  25. Connie McBride

    firedac, delphi and blobfields

    I have this statement in my code, but it doesn't always post to the dataset. no sql statement is generated - but only sometimes. 1) the reg_value is always changed in this procedure. 2) the procedure is called in hundreds of places. 3) the procedure works in most cases, not in others. 4) I recently updated from delphi 12.1 to delphi 12.2, and it used to work all the time. I am trying to figure out what changed that would cause it to NOT post the record. the code: aStream.Position := 0; tBlobField(dmCommon.tblGridIniREG_VALUE).LoadFromStream(aStream); freeAndNil(aStream); dmCommon.tblGridIni.Post;---> no SQL statement is generated. nothing is seen through the tracers (sql profiler or firedac trace) this same code works in Delphi 12.1, no issue. the structure: all fields are filled in with values. the issue happens when trying to update. adding new records is fine. doing an Can't include sample data, because it seems unprintable characters are part of it I am saving the grid settings from a devexpress grid by writing to a memory stream and loading it to the varchar(max) field. The problem isn't inherently devexpress, the same version of devexpress works in delphi 12.1. tracing deep into the code, it is returning that there is no change to the reg_value field, so it isn't creating the update statement. Any ideas which flag needs to be unset (or set)? cached updates is not in use.
×