-
Content Count
3323 -
Joined
-
Last visited
-
Days Won
110
Everything posted by Lars Fosdal
-
"Always break line between else and if" vs. comments
Lars Fosdal replied to uligerhardt's topic in GExperts
/off-topic Preferences of code. I like begin/end for clarity. However, I also like unusual breaks before then and strange indentations of single statements. If only I could convince the formatter to do my bidding. procedure MyProcedure(a, b: Boolean); begin if a then begin if b then Beep else Beep end else begin if b // Kommentar then Beep else Beep; end; end; -
I think I was fooled by my own expectations with regards to the simplicity of OAuth2 and functional level of the TOAuth2Authenticator. The C# code example can be found here, but it uses another assembly from Thinktecture to do the http parts. https://github.com/LarsFosdal/csharp-ion-api-sdk/blob/master/DotNetBackendOAuth2/Program.cs I'll ponder a little, google some more, and see if I can't crack this nut.
-
I have instrumented the C# app with logging, so I see exactly what happens. The challenge is convincing the Delphi REST components to do the same thing.
-
There also is a confusing comment here https://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.SQLite_Encryption_Sample
-
It is just weird with the message saying that the DB is NOT encrypted? Ref. https://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Phys.SQLite.TFDSQLiteSecurity.CheckEncryption
-
Are you sure there is no way to convince FD to use the appropriate encryption method?
-
Why can't it connect?
-
What if you in the app, first export to json with UniDAC, then close all Unidac DB conns, and then import with FireDAC?
-
It might be a bit banale, but what about a new version of the old app that exports to a json or xml file, and then the new app can import from that json or xml file?
-
filter box Object Inspector Filter Box Search in Sub-Properties
Lars Fosdal replied to Maximiliam's topic in Delphi IDE and APIs
Nice idea, though. File a suggestion at https://quality.embarcadero.com/secure/Dashboard.jspa -
Please enter a report in https://quality.embarcadero.com/secure/Dashboard.jspa
-
$ is not mentioned on that page, and $$ did not help.
-
That is interesting. Although, at that point the creation has been completed.
-
Have a look at C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\Database\RESTDemo
-
Note that as an alternative to post-build events in the IDE, you can use a build server - such as Continua CI. We use that. It triggers after a commit to Git, increment versions, builds, runs unit tests, and translates, signs, package and copy the variants to their respective staging shares, and creates a zipped copy. Amazing time saver that ensure all builds are consistently handled.
-
The given example does not have any spaces in the references, so quotes won't help for those - otherwise I agree.
-
TDateTimeHelper from D11 that can be used in D10.4?
Lars Fosdal replied to David Schwartz's topic in RTL and Delphi Object Pascal
The cost of maintaining multiple versions is staggering. With limited resources, it makes sense to focus on subscription users. I don't like it either, and I really don't like how they gimp the community version, but yeah - they are not MS with deep pockets filled from other products. -
Does Visual Studio's Intellisense fail as often as Delphi's Code Insight?
Lars Fosdal replied to PeaShooter_OMO's topic in Delphi IDE and APIs
I use VS 2022 and C# on .NET. It gets confused if you have third party assemblies without sourcecode that extend standard classes. It will show the doc for the standard class methods, even if the IL is decompiled correctly for the third party assembly. But, no, I haven't seen it stop working completely. -
Also, I would like to stress that doing direct SQL to a server from a mobile device is high risk. I recommend a REST service as a front end to the database.
-
Create a shared percentage variable that can be referenced from both the db thread and the main thread In the UI, show the progress bar display, and refresh it on a timer f.x every 500ms, getting the percentage from the shared variable Create a thread to do the SQL fetch/write operations and update the shared progress percentage variable Once the thread is completed, close the progress bar display You may want to protect the shared variable with a critical section.
-
@Dmitry Arefiev - Is there a way to deal with $ in table names for PostgreSQL?
-
Another alternative is to use OutputDebugString, which can be seen in debuggers and with a debug output watcher app. I went a step further and added a DebugOut wrapper, so that I can use a switch to silence OutputDebugString as well as redirect the strings to a buffer which is flushed to a log file.
-
I'd probably just Halt;
-
Hard coded. FireDAC.Phys.SQLPreprocessor.pas, line 1028 (D11.1) '$': if not FInStr1 and not FInStr2 and (ConnMetadata <> nil) and (ConnMetadata.Kind = TFDRDBMSKinds.PostgreSQL) then ProcessQuoteTag; Although that seems to be an exception for PG. I guess Alphanum + Underscore is the only safe bet for DB entity names.
-
Quick and dirty: What if you add the table names as aliases too? tableWRules tableWLinks with tjWLL as (select wrl.fldidxwarerule as fldidxwarerule, json_agg(wll.*) as "WARESRULESLINKS" from vdata.":tableWRules" wrl inner join vdata.":tableWLinks" wll on (wrl.fldidxwarerule = wll.fldidxwarerule) where And add the actual table names like you would do with any other parameter?