Hi All.
I've run into a problem which I need helt to solve:
Run-Time error '-2147217887 (80040e21)
ODBC--call failed.
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
.....
rsTable2.Update
rsTable2.MoveNext
Loop
rsTable2.Close
rsTable1.Close
(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 so
Of course, the involved procedures works fine with access backend.
I hope someone can help with this! Please excuse my lousy english....
Best regards,
Geirr.
I've run into a problem which I need helt to solve:
Run-Time error '-2147217887 (80040e21)
ODBC--call failed.
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
.....
rsTable2.Update
rsTable2.MoveNext
Loop
rsTable2.Close
rsTable1.Close
(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 so
me 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....
Best regards,
Geirr.
Last edited: