Forum Discussion

GontranHarvey's avatar
GontranHarvey
Copper Contributor
Jan 16, 2023
Solved

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, strConString)
CurrentTableName = tdf.Name
CurrentDb.TableDefs.Append tdf'This is where I got the error

 

 


I got this message:  'dbo.tbl_SalesForcastPromotionsCategories' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.

 

This code work perfectly fine for the last 6 years. Until the version 16.0.15831.20216

I rollback my office version to 16.0.15831.20208 and everything works.

 

Thanks

14 Replies

  • lemon71's avatar
    lemon71
    Copper Contributor

    GontranHarvey 

     

    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.

  • nikos_d's avatar
    nikos_d
    Copper Contributor
    Hi all,
    We have the same issue in all of our customer installations running any version above 15831.20208
    We are reverting all our customers to version 15831.20208 in order to be able work.

    We hope this major issue will be fixed soon in a new version.



Resources