从数据库中检索记录时出现撇号错误 [英] Apostrophe error while retrieving the record from the database
问题描述
当我在数据库中提交文本字段时,我使用Replace函数将单引号替换为double,即替换(q,,,, ;)
工作正常。当我从具有
撇号的数据库中检索字段时,我收到''Object expected''错误消息。有没有
的方法来解决这个问题?
谢谢,
Bhavna
Bhavna写道:
我正在使用Replace函数将double引号替换为double
在数据库中提交一个文本字段,即替换(q,,,)
工作正常。当我从具有
撇号的数据库中检索字段时,我收到''Object expected''错误消息。即使我正在检查撇号的代码。对于例如strOutput = Replace(strOutput,"''""& quot;")
有没有办法解决这个问题?
谢谢,
Bhavna
Bhavna写道:
当我在数据库中提交文本字段时,我使用Replace函数将单引号替换为double,即替换(q,'',, '''')
工作正常。当我从具有
撇号的数据库中检索字段时,我收到''Object expected''错误消息。有没有
方法来解决这个问题?
谢谢,
Bhavna
当我从数据库中检索记录时,我正在检查
撇号。对于例如strOutput = Replace(strOutput,"''""& quot;")。
仍然我收到Object预期错误消息
您是否尝试过使用chr()?
strOutput =替换(strOutput,chr(34),chr(39))
。 。
" Bhavna" < bh ********** @ hotmail.comwrote in message
news:11 ******************** **@s13g2000cwa.googlegr oups.com ...
>
Bhavna写道:
当我在数据库中提交文本字段时,我使用Replace函数将单引号替换为double,即替换(q,'',, '''')
工作正常。当我从具有
撇号的数据库中检索字段时,我收到''Object expected''错误消息。有没有
方法来解决这个问题?
谢谢,
Bhavna
当我从数据库中检索记录时,我正在检查
撇号。对于例如strOutput = Replace(strOutput,"''""& quot;")。
仍然我收到Object预期错误消息
>
I am using a Replace function to replace single quotes with double when
submitting a text field in the database i.e. Replace (q, "''", "'' '' ")
which works fine. When I retrieve the field from the database which has
apostrophe I am getting ''Object expected'' error message. Is there a
way to fix this?
Thanks,
Bhavna
Bhavna wrote:I am using a Replace function to replace single quotes with double when
submitting a text field in the database i.e. Replace (q, "''", "'' '' ")
which works fine. When I retrieve the field from the database which has
apostrophe I am getting ''Object expected'' error message. Even though I am checking in the code for apostrophe. For e.g. strOutput = Replace(strOutput, "''", "'")
Is there a way to fix this?
Thanks,
Bhavna
Bhavna wrote:I am using a Replace function to replace single quotes with double when
submitting a text field in the database i.e. Replace (q, "''", "'' '' ")
which works fine. When I retrieve the field from the database which has
apostrophe I am getting ''Object expected'' error message. Is there a
way to fix this?
Thanks,
BhavnaWhen I am retrieving the records from the db I am checking for
apostrophe. For e.g. strOutput = Replace(strOutput, "''", "'").
Still I am getting Object expected error message
Have you tried using chr() instead?
strOutput = Replace(strOutput, chr(34), chr(39))
..
"Bhavna" <bh**********@hotmail.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...>
Bhavna wrote:I am using a Replace function to replace single quotes with double when
submitting a text field in the database i.e. Replace (q, "''", "'' '' ")
which works fine. When I retrieve the field from the database which has
apostrophe I am getting ''Object expected'' error message. Is there a
way to fix this?
Thanks,
Bhavna
When I am retrieving the records from the db I am checking for
apostrophe. For e.g. strOutput = Replace(strOutput, "''", "'").
Still I am getting Object expected error message
这篇关于从数据库中检索记录时出现撇号错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!