Forum Discussion

GontranHarvey's avatar
GontranHarvey
Brass 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.



      • Karl_Donaubauer's avatar
        Karl_Donaubauer
        MVP

        Hi,

         

        The new version 2301 (Build 16026.20146) released in the Current Channel today, should provide a fix for this bug. Please report if it worked for you.

        It can take a few days to roll out new versions. Those affected by the bug can actively request it with Update Now.

         

        I will also report on the effects or side effects in my documentation article.

         

        Servus
        Karl
        ****************
        Access Bug Trackers
        Access News
        Access DevCon

    • Tom_van_Stiphout's avatar
      Tom_van_Stiphout
      Steel Contributor
      While you're reverting: also switch away from Current Channel. Way to aggressive in most business situations.
      • nikos_d's avatar
        nikos_d
        Copper Contributor
        In our case, this is not feasible, because our MSAccess Application customers are using whatever Office version they have already purchased.
    • GontranHarvey's avatar
      GontranHarvey
      Brass Contributor
      Here all you need :
      https://www.accessforever.org/post/naming-of-linked-sql-server-tables-is-inconsistent
      • nikos_d's avatar
        nikos_d
        Copper Contributor
        Thank you for the link. Good to know that it will be fixed soon.