ODCB Call Failed - Run T Error 21472117887 (80040e21)
I've run into a problem which I need helt to solve:
Run-Time error '-2147217887 (80040e21)
Background: Using Access 2016 (FE), SQL Server 2012. (BE)
Linked tables, and using 'dsnless' hardcoded connection, with SQL Authentication.
The error message occur on table update with the .update fuction, and the debuger points out the line with .update as the problem in program.
But it seems that this occur on nested level, like: (without the WHERE)
rsTable1.Open "SELECT * FROM Table1",,adOpenStatic, adLockOptimistic
strTemp = Table1.Field1rs
Table2.Open "Selcet... etc where Table2.Field1 =" & [strTemp] etc...
Do While Not rsTable2.EOF
rsTable2!Field2 = rsTable1!Field1
(Please check the Editor Mode in upper right corner to see the code with Indent)
The realy odd part is the Table2 updates, but when finished I got the error message above. And the rsTable2.Update are emphasize in Yellow.
It's also very frustrating that this code works some places, and some places not. So far, I've seen this where the update are nested in two or more levels like the proc above.
Of course, the involved procedures works fine with access backend.
I hope someone can help with this! Please excuse my lousy english....
Last edited by Geirr; 12-04-2017 at 11:55 AM.