Forum Discussion
GontranHarvey
Jan 16, 2023Brass Contributor
ODBC tables connection problem since 16.0.15831.20216
The new update 16.0.15831.20216 has a bug when connecting ODBC tables. When I execute this code: Set tdf = CurrentDb.CreateTableDef(strCurrentTable, dbAttachSavePWD, strRemoteTableName, strC...
- Jan 16, 2023
Hi Gontran,
The problem and potential workarounds are documented in our bug tracking blog.
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
lemon71
Jan 20, 2023Copper Contributor
Just run into the same problem and couldn't understand why this code was working fine and now wasn't. Wish I'd checked here first, but then the line of code at fault is the last one you would suspect.
I fixed my issue by adding this to the reconnection routine.
'Reconnect the sql view
Set myTD = Nothing
Set myTD = myDB.CreateTableDef(sLocalTable, 0, sRemoteTable, g_sODBC_CONNECTIONSTRING)
'Safety net fix
If myTD.Name <> sLocalTable Then myTD.Name = sLocalTable
myDB.TableDefs.Append myTD
This works and is only called if needed. Just wish I hadn't wasted hours of time I don't have on this, thanks MS.