Exception when trying to execute “REPLACE” against MS Access

前端 未结 4 467
我寻月下人不归
我寻月下人不归 2020-12-02 00:24

I\'m trying to execute an SQL query against a MS Access database containing a \"REPLACE\" function:

UPDATE MyTable 
   SET MyColumn = REPLACE(MyColumn, \'MyO         


        
4条回答
  •  一整个雨季
    2020-12-02 00:33

    In interactive Access, the Access Expression Service takes care of providing you access to user-defined and VBA functions, but the Access Expression Service is not available from outside Access. When accessing Jet/ACE data via ODBC or OLEDB, only a limited number of functions are available. Replace() is not one of them. However, you may be able to use InStr() and Len() to replicate the functionality of the Replace() function, but it would be fairly ugly.

提交回复
热议问题