This situation is consistently reproducible on MS Access 2010 (x32) and MS Access 2016 (x32) on Windows 7 or Windows 10 environments. I have an existing MS Access application (with SQL Server backend, linked tables) that works as desired using SQLSRV32.DLL
to connect to SQL. I am trying to change my application to a dll that will support TLS 1.2. I have successfully tried SQLNCLI11.dll or MSODBCSQL13 and 17 when connecting to SQL 2010,2012,2014 and 2016 but the application generates an error when working with
a SQL 2017 database.
I have a SQL table:
CREATE TABLE [dbo].[AppUser](
[InternalID] [int] IDENTITY(1,1) NOT NULL,
[UserName] varchar NULL,
[PW] varchar NULL,
[SecLevel] [smallint] NULL,
[LastLogin] [datetime] NULL,
[CheckRelationships] [bit] NULL,
CONSTRAINT [PK_AppUser] PRIMARY KEY CLUSTERED
(
[InternalID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
My application has a linked table (DSN using MSODBCSQL17.dll) to the SQL AppUser table and a bound form (AppUser2017) to this table. The main screen has a button which opens the bound form "hidden" specifying
the ID (primarykey) as a filter. The LastLogin field is then updated to the current date and then the bound form is closed. When the bound form is closed, I get the popup "Write Conflict" This record has been changed by another user since you started editing
it. My only options are Copy to Clipboard or Drop Changes.
The only code on my main form is:
Private Sub Command0_Click()
DoCmd.OpenForm "AppUser2017", acNormal, "", "[InternalID] = 268380106", , acHidden
Forms!AppUser2017!LastLogin = Now()
DoCmd.Close acForm, "AppUser2017"
End Sub
Can anyone explain this? I could probably hack away to get rid of the error but it seems like a bug since all other versions of SQL Server do not have this issue.