Sign-up....

引号不能嵌套,用什么方法来解决?在线等

VBA docmd.runsql中引号不能嵌套,就是说,不能出现这样的情形“…“……”…”。可是程序要求有三个以上的引号嵌套,除了单、双引号,还有没有其他的符号能替代?或者是用其他什么办法解决这个问题?

[104 byte] By [msdn] at [2007-11-17 11:06:03]
# 1 Re: 引号不能嵌套,用什么方法来解决?在线等

VB的引号使用:

dim a as string

a="…""……""…"

msgbox a

tztz520 at 2004-9-18 11:14:41 >
# 2 Re: 引号不能嵌套,用什么方法来解决?在线等

如果一定要用双引号的话

用它的ASC码,比如str=chr(Asc(")) & "123" &chr(asc("))这样应该就可以了

一般SQL语句都用单引号。

wwqna at 2004-9-18 16:57:34 >
# 3 Re: 引号不能嵌套,用什么方法来解决?在线等

msgbox "…"……"…"

jam021 at 2004-9-20 9:18:31 >
# 4 Re: 引号不能嵌套,用什么方法来解决?在线等

chr(34)

xinliangyu at 2004-9-20 11:46:45 >

VB

All Classified