android - 在 sqlite 错误中插入撇号值

标签 android

我无法在 sqlite 中插入撇号字符。我试过这种方式,论坛上很多人说的是用“''”替换“'”

String replace=replaceString.replace("'"," ''") but after using this method too gives insert error.

最佳答案

我喜欢用

String replace = replaceString.replace("'","\'");

这会将撇号插入到表中。

关于android - 在 sqlite 错误中插入撇号值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9401777/

相关文章:

java - 带有 Fragment 和 ViewPager 的 NullPointerException

java - 如何获取微调器值的整数值?

java - 错误: org. json.JSONEXception : Value Access of type java. lang.String无法转换为JSONObject

android - 如何检测软件键盘在 Android 电视(消防电视)上是否可见?

android - 无法在 AlertDialog 中编辑 EditText

android - 我的 setListAdapter() 有问题

javascript - 在 Android 中调用 Javascript 函数时未捕获的类型错误

android - 在 Android 中启用蓝牙特性通知(蓝牙低功耗)不起作用

android - 用工具栏替换操作栏后出现 NullPointerException

android - 如何将验证器传递给 Flutter 中的 `TextFormField'?