Undefined function 'Replace' in expression

前端 未结 2 2002
夕颜
夕颜 2021-01-21 03:11

I am having a VB.Net application. I connect it with a MS Access database. Now I have to execute a query. My query is : Update table1 set field1=replace(field1,\'|\',\'\"\'

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 03:42

    Unfortunately when you connect to an Access database from you VB.Net application you aren't using the Access query engine at all. You're using Jet. Some of the functions available to you in Access (such as Replace) aren't available in Jet.

    The classic solution is to use a combination of Iif, Instr etc (those are available). Yep, it's not as nice as having Replace to play with but you'll have to learn to do without.

提交回复
热议问题