-
Content Count
3323 -
Joined
-
Last visited
-
Days Won
110
Posts posted by Lars Fosdal
-
-
What happens if you install the font in Windows and just try to use it the same way as any other font?(Saw that was answered already).AddFontResource is a WinAPI call, so if you plan for cross-platform FMX code, you should not use it.
Also, https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-addfontresourcea
says that return value for success = the number of fonts installed, and 0 = failure. -
On 3/9/2019 at 1:02 AM, Hans J. Ellingsgaard said:It sounds strange. You should never get a lock on a read only query. If you have many concurrent users, you could have drop of performance, but not locks.
Read queries can lock and be deadlocked in MS SQLServer.
https://aboutsqlserver.com/2011/09/28/locking-in-microsoft-sql-server-table-of-content/
- 1
-
Grammarly is a nice Chrome plugin for spell-checking in any edit box.
https://chrome.google.com/webstore/detail/grammarly-for-chrome/kbfnbcaeplbcioakkpcpgfkobkghlhen
-
Also, if it is your own old post, you can also check your activities on your profile.
-
In the Web UI, search is upper right on the white bar.
-
You should read this post
- 8
-
So, let's just rename it to Insight Errors...
- 1
-
2 minutes ago, Attila Kovacs said:WITH (NOLOCK) ?
Well, I've added that where it seems safe for the viewers, but it is a short way between being a viewer and being a requestor, so for certain lookups, the data needs to be accurate.
The entire allocation part is a very heavy SQL statement with joins, functions, conditions and sorting - and the actual grabbing is totally void of transactions.
-
It really annoys me that they didn't adapt Error Insight for inline declared variables. So ugly!
-
The joys of inherited problems.
I am looking for a pattern or advice on how to best allocate a set of records to a specific requestor when there are multiple parallel requests, and there are multiple parallel request viewers.In practice: Allocate a set of deliveries to a user, when there can be multiple users requesting deliveries in parallel, and multiple users viewing the deliveries in parallel.
The current SQL can give deadlocks both on allocations and on viewing, so something is definitively not right, and I need to improve on it.
There is SO, where it all is an exercise in asking the question right...
Are there other good discussion sites?
-
1 hour ago, Khorkhe said:in 10.3.1, the compiler is ignoring changes I make to a regular unit (.pas) of a VCLexe.
Every time this happens to me, there are duplicate source files on different paths.
I believe I am editing ./myproject/thisversion/myfile.pas, while I actually am in ./myproject/thatversion/myfile .pas
Sometimes this happens because I used find in files on the wrong path, or a file was included in the project from the wrong path. -
16 hours ago, Primož Gabrijelčič said:Aaaaah, single READER! Sorry, folks. That is such a weird concept (although, I admit, useful in some situations) that my brain autocorrected it into single WRITER. 🙂 🙂 Silly brain!
I use MWSR queues for stuff like logging. Multiple threads queue things for logging, and a single log thread does the actual work.
Basically, it is a useable model for any kind of data that in the end needs to be serialized to storage.
-
On 3/4/2019 at 10:58 AM, Der schöne Günther said:How many hours per week do you estimate developers at your company waste on maintenance (i.e. dealing with bad code / errors, debugging, refactoring, modifying)?
It is waste if you spend time continuously fixing the same broken code, instead of buying or rebuilding something that can replace it and reduce "daily" maintenance chores?
- 1
-
I am not sure that I am buying Joel's TCP analogy. It doesn't guarantee arrival, but it does guarantee that you as a sender will know if it arrived or not.
-
Added updated code example for how to prioritize specific MSSQL connection types on a machine that may have multiple installed.
-
Non-implementation detail = the interface declaration - i.e. the black box UI - the what.
Implementation detail = how an interface has been implemented - i.e. the inside of black box - the how.You want to use the first, and avoid relying on details from the second.
- 2
- 1
-
FYI, @Martyn Spencer, it seems that the new MSOLEDBSQL drivers are as fast as SQLNCLI. See other thread above for how to select a specific driver.
-
EMBT placed the above constants in the implementation section of the FireDAC.Phys.MSSQL, which I guess is good for hiding implementation details, but not so good for doing overrides... hello, new literal.
Initial benchmarks indicate that C_2016_ODBC = 'ODBC DRIVER 13 FOR SQL SERVER' is about the same speed as SQLNCLI 11, which is good news.
class function TPSDFireDatabasePoolMSSQL.FindBestDriver(const Link: TFDPhysMSSQLDriverLink): String; const // Constants copied from implementation section of FireDAC.Phys.MSSQL C_2017_ODBC = 'ODBC DRIVER 17 FOR SQL SERVER'; C_2016_ODBC = 'ODBC DRIVER 13 FOR SQL SERVER'; C_2012_ODBC = 'ODBC DRIVER 11 FOR SQL SERVER'; {$IFDEF POSIX} C_FreeTDS = 'FreeTDS'; {$ENDIF} {$IFDEF MSWINDOWS} C_2012_NC = 'SQL SERVER NATIVE CLIENT 11.0'; {$ENDIF} var DriverList TStringList; WantedList : TArray<String>; begin Result := ''; WantedList := {$IFDEF MSWINDOWS} [C_2017_ODBC, C_2016_ODBC, C_2012_NC, C_2012_ODBC] {$ENDIF} {$IFDEF POSIX} [C_2017_ODBC, C_2016_ODBC, C_2012_ODBC, C_FreeTDS] {$ENDIF}; DriverList := TStringList.Create; try Link.GetDrivers(DriverList); for var Wanted in WantedList do for var Driver in DriverList do if CompareText(Wanted , Driver) = 0 then Exit(Wanted); finally DriverList.Free; end; end; class function TPSDFireDatabasePoolMSSQL.CreateDriverLink(const aOwner: TComponent): TFDPhysDriverLink; var Res: TFDPhysMSSQLDriverLink; begin Res := TFDPhysMSSQLDriverLink.Create(aOwner); Res.ODBCDriver := FindBestDriver(Res); Result := Res; end;
-
Oddly enough, FireDAC seems to prefer SQLNCLI over everything else, and I can't find a way to override that priority, apart from explicitly setting the ODBCDriver on Create, which makes it harder to handle it not being installed
procedure TFDPhysMSSQLDriver.InternalLoad; begin inherited InternalLoad; if ODBCDriver = '' then ODBCDriver := FindBestDriver( {$IFDEF MSWINDOWS} [C_2012_NC, C_2016_ODBC, C_2012_ODBC, C_2017_ODBC, C_2008, C_2005, C_2000] {$ENDIF} {$IFDEF POSIX} [C_2016_ODBC, C_2012_ODBC, C_2017_ODBC, C_FreeTDS], C_FreeTDSLib {$ENDIF} ); end;
-
Somewhat related: SQLNCLI is deprecated. MSOLEDBSQL is the new best practice.
As for unreliable connections - some servers disconnects pretty quick, so we have a wrapper that handles this and reconnects as required.
-
-
Ordered print + epub version.
-
Rio 10.3.1 Indy TIdSSLIOHandlerSocketOpenSSL seems to not support TLS 1.3.
Is there an update anywhere?
- 1
-
Is there a cross-platform version of IsDebuggerPresent? I want to disable some of my automatic maintenance threads when the app is running under a debugger, now also for a FireMonkey app.
10.3.1 has been released
in Delphi IDE and APIs
Posted
The new IDE skinning is a disaster.
So! freaking! slow!