From a Windows 10 Pro workstation (in a workgroup) I am having problems connecting to a SQL server 2022 (Express) on a Windows 11 Pro machine (same workgroup), using Windows Auth. I have setup the SQL to allow both Windows and SQL server users, and testing connection with a UDL file from the Windows 10 Pro machine, it connects with SQL Server logon, but not with Windows Auth. On the Windows 11 Pro the UDL connects both with Windows Auth. and SQL Server User.
So, I have created a small test program, in which I set .server, .database, .authentication, .username and .password, based on contents of edit boxes, BEFORE I attempt to connect (by pressing a button to set tmsconnection.connected := true;). Tmsconnection.options.provider is set to prAuto.
When I launch the program (on the Windows 10 Pro), it fails with an connection error (after 15 seconds). No form is shown and no possibilities to enter the required information or press the "connect" button. It is like it tries to connect to the sql-server as part of the creation of the components. NB! The checkbox Connected in tmsconnection IS NOT ticked, so no automatic connection attempts should occur.
When I run the same program on the Windows 11 Pro machine with the SQL server and Database, it starts up without any problems, and I can connect without problems both with Windows Auth. and SQL Server user
I am using designtime components, and the tmsconnection component is as default set up to auServer auth., with all other relevant fields filled in, to connect using SQL Server User.
As I mention, it is like the program, as part of start-up, tries to connect to the sql server, but even so it should work, as all the needed fields as default is filled in for SQL Server User connection.
I am thinking it might lie in the selection of the actual provider, the tmsconnection selects, but I am supprised that would happen before the actual connection attempt.
Can you please help.
NB!I can send you the small test program, if you want to see it and maybe try it for yourself.