

Brian Evans
Members-
Content Count
431 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Brian Evans
-
Migrating a Delphi XE4 System to MSSQL, PostgreSQL, and Linux – Softacom’s Experience
Brian Evans replied to Serge Pilko's topic in Tips / Blogs / Tutorials / Videos
Case seems written for potential customers looking to have something similar done. Not much detailed info of interest to other Delphi developers. Not unexpected as the rest of us could be possible competitors for such work. Still interesting data point for what is being done in regards to modernization of older projects developed with Delphi. -
To be a bit more direct - the unit below produces a bunch of errors for function two's definition but its definition is fine when used elsewhere. Can you spot what is wrong? Look hard. unit UnitTest; interface function One : integer; function two : integer; implementation function one : integer; begin one := 1; // end; function two : integer; begin two := 2; end; end.
-
Putting the function definition inside a Begin / End code block produces the multiple errors posted. So the unit has an open code block where the function definition currently is.
-
Messed up structure elements can lead to odd errors in others parts of the code. It may look like a block of code is part of a function but due to messed up structure elements it actually isn't. Your first error indicates you are still probably still inside a begin/end code block - the same error is produced by the code below in a simple button click procedure TForm1.Button1Click(Sender: TObject); begin function AddTwo(a,b:integer):integer; end;
-
D12.1: Debugger Assertion Failure in pcntrlsrv.cpp
Brian Evans replied to hukmac's topic in Delphi IDE and APIs
Antivirus / security software can mess up debugging. Excluding the IDE (bds.exe) sometimes helps with odd errors that seem to start happening without changes in code or the IDE. -
That sounds like the OS/keyboard is retyping content into the edit control. The edit does go back to being empty and then having 1,2,3 etc characters in it just within a short period of time. One thought: keep track of the last partial search string and start/reset a short timer in the OnXXX events. When the timer event triggers check if the edit content is not equal to what was last searched for and update the search as appropriate. This gives time for the OS/keyboard to be done changing the edit contents before you use it's contents in your search.
-
Had time to test it and using 32-bit client binaries from a newer PostgreSQL 32-bit ODBC driver version still works. Tested in a Windows Sandbox with a Delphi test app + binaries from the psqlodbc_15_00_0000-x86 32-bit ODBC driver with postgresql-15.13-3-windows-x64 installed. Test app is just a button that opens a connection and pulls results into a grid. Note clients / client libraries are backwards compatible except for some really old versions. You can use the client binaries from the latest release ODBC driver. Tested this with client binaries from the REL-17_00_0006 32-bit ODBC client and connecting to the 15.13-3 server mentioned above.
-
Windows 10 Home version 1903 or later have the Windows Sandbox as an feature that can be enabled. https://learn.microsoft.com/en-us/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-install?source=recommendations Not familiar with Windows 10 Home Single Language and if Sandbox is available as a feature. Worth checking using the above instructions. Could also try an archive utility like 7Zip to extract files from the MSI installer. The Postgres ODBC installer just puts all files in one directory for each version (32-bit or 64-bit).
-
Not actively using PostgreSQL currently but for past use: The PostgreSQL ODBC driver comes in 32-bit and 64-bit versions and uses libpq.dll to connect. It places all the needed files in it's install directories including those it needs form the Microsoft C Runtime Library. Get the ODBC drivers from : https://www.postgresql.org/ftp/odbc/ For version 15 32-bit only that looks like it would be psqlodbc_15_00_0000-x86.zip from https://www.postgresql.org/ftp/odbc/versions.old/msi/ What I would normally do is download the ODBC installer, open a Windows Sandbox, copy and run the installer there. Then look in the appropriate Program Files directory and grab all the needed DLLs from where the ODBC driver was installed.
-
Memo lines{i] to labelv ok. Labels to Memo lines nope
Brian Evans replied to Freeeee's topic in General Help
The Memo could have fewer than three lines in it. If you want to update lines make sure they exist first. while Memo1.Lines.Count < 3 do Memo1.lines.Add(''); -
Need to create an email draft with an HTML body in the "new" Outlook
Brian Evans replied to Martin Binder's topic in Network, Cloud and Web
I don't lose the HTML body here. 1. Create a formatted draft message. Save as to EML file. 2. Edit the EML file to add the X-Unsent: 1 header. 3. Double click the EML file and it loads in new Outlook as an editable message with HTML formatting intact. The EML file does have two versions of the body - one HTML formatted and one not. -
TMS TAdvPDFViewer not working on Windows 7 – any workaround?
Brian Evans replied to smooth99's topic in VCL
Looks like it uses PDF support provided by the OS. So you need another PDF -> image engine/library. ref: https://support.tmssoftware.com/t/tms-vcl-pack-pdfviewer-not-function-on-some-users/24285 https://learn.microsoft.com/en-us/uwp/api/windows.data.pdf.pdfdocument?view=winrt-26100 There is PDFium (https://pdfium.googlesource.com/pdfium/) which is based on the PDF support in Chromium. There are some Delphi components/source that use it - both commercial and opensource. ex https://github.com/ahausladen/PdfiumLib https://winsoft.sk/pdfium.htm Also Developer Express VCL has PDF components as well. Not sure of Windows 7 support but they have a demo you can use to check along with a 30 day trial. Just a bit pricey if not using a lot of the components / functionality they offer. https://www.devexpress.com/products/vcl/pdfviewer/ -
FireDAC getting tripped up with PostgreSQL transactions
Brian Evans replied to FLDelphi's topic in Databases
Start with gathering or showing more detailed database exception information. See: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Handling_Errors_(FireDAC) A TFDGUIxErrorDialog that is enabled during debugging can make things a lot easier. Nothing stands out - often if an code block looks clean the error is elsewhere or some assumption being made doesn't hold true. -
I don't see a certificate with that name here: https://www.microsoft.com/pkiops/docs/repository.htm There is one named microsoft identity verification root certificate authority 2020. Seems a redundant "Enterprise" has been added in some references confusing things. I believe they both refer to the same underlying certificate. The certificate should be automatically installed by Windows if it's connected to the Internet. Ref bottom of: https://support.microsoft.com/en-au/topic/kb5022661-windows-support-for-the-trusted-signing-formerly-azure-code-signing-program-4b505a31-fa1e-4ea6-85dd-6630229e8ef4
-
Native applications can make use of the same REST calls as web apps. Saves creating another API from scratch. There are a few libraries available for Delphi to make this easier. Probably too many which makes choosing a bit of a pain point.
-
Something to try: Look at a report .pas file for anything that will tell it apart from other non-report .pas files - like use of an ACE Report object/component name. Then do a Find in Files ... for it and see if any results have a .pas file with a name that doesn't follow your usual pattern.
-
Quick-Report - Pointer Error - Composite Report
Brian Evans replied to ebachs10's topic in Delphi Third-Party
That looks like the wrong thing to be working on - an unrolled loop vs a loop just isn't a big deal. Likely separate units so each could be customized but that didn't end up being required. Or some actually are customized by having different properties set for the same base QuickReport layout or in some other way. -
Need help how to get me Embarcadero RAD Studio 2010 Professional (Delphi/Pascal) • All of the 3rd-party VCL packages at the versions listed in your table
Brian Evans replied to Jimoffice9@gmail.com's topic in General Help
When you buy the latest version of Delphi, you also get access to earlier versions of Delphi at no extra charge.: https://www.embarcadero.com/products/delphi/previous-versions Delphi 2010 is covered by this. A lot of third party component vendors do something similar for the same reason with older versions available in the registered users download areas. You may need to make a request or they might be there already. -
FireDAC encrypted SQLite DB with Delphi 12.3 x64
Brian Evans replied to Frédéric's topic in Databases
What version of SQLite are you trying to use under 64-bit? SQLite dropped support for the method FireDAC was using to provide encryption. Read : https://docwiki.embarcadero.com/RADStudio/Athens/en/What's_New#FireDAC_SQLite_Version_Update -
Debugger keeps the execution line centered
Brian Evans replied to Attila Kovacs's topic in Delphi IDE and APIs
Some random questions: 1. Do you have multiple screens with one using a different DPI setting? 2, Anything non-default DPI wise? launch settings, overrides etc Thoughts: could be a bad calculation of if the line to be highlighted is visible and scrolling the editor when it doesn't need to. -
Possibly interesting issue with a variant holding a Bcd.
Brian Evans replied to MarkShark's topic in RTL and Delphi Object Pascal
My understanding is for expressions with variants non-variants are converted to a variant and operations like + follow Windows OLE (varAdd) in how they are combined. Neither cares about the order of variants/types just about combinations. string + variant with BCD value becomes variant with string value + variant with BCD value. For adding variants string+number or number+string both add numbers. Ref: https://docwiki.embarcadero.com/RADStudio/Athens/en/Variant_Types_(Delphi)#Variants_in_Expressions Ref: https://learn.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-varadd#remarks -
The integer part is seconds since the Unix Epoch so is a Unix timestamp. Some sources add fractional seconds so they can contain timestamps with more accuracy.
-
Storage IO suddenly being slower will cause similar symptoms. All writes and any reads that need to get data from the disk instead of the cache bottleneck. Things that used to not interfere with each other now do. Years ago a battery on a RAID card in a SQL Server cluster failed making write performance 5% of normal. All sorts of odd issues until the anemic disk performance was noticed and bunch of disk heavy tasks were temporarily disabled to allow the main work to still get done.
-
Removed 7 and installed 8 here. No 64-bit design time packages so not yet available in the 64-bit Initial Release of the Delphi 12 IDE. Looking at the contents of C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\KonopkaControls-290-8.0_For12.3\Bin\Win64 there does seem to be 64-bit design time packages but they were not installed? Manually copied the two design time BPLs to C:\Users\Public\Documents\Embarcadero\Studio\23.0\Bpl\Win64, did Component -> Install Packages, Add, selected them both and installed them. Some basic tests and they seem to work.
-
Most Antivirus software also have a way to submit false positives for further analysis. If they agree they white list the file names and hashes that otherwise trigger their heuristics based scanning engine. Helps others and you don't have to maintain commercial applications in your own whitelist long term.