应该是8.1.4版本, 为了防止SQL注射的安全版本。不过里面有一个CONFIG参数可以改回到以前兼容版本,但要冒被SQL注射的危险。
我平常都将单引号替换成全角的单引号

解决方案 »

  1.   

    2楼说的用参数,能不能说的详细一点,我是第一次用postgres,对他不太熟悉 ,你能不能举个例子来说明一下,谢谢了
    3楼,我做的是日文的软件,是不允许出现中文的字符的,你 没有其他方法了吗 ?请不吝赐教
      

  2.   

    谢谢大家的回复,用转意字符"\"是可以的,也许是当时别的地方出了问题.
    特贴上给字符串中'(单引号)+转意符号"\"的代码,作为感谢,
    Private Sub subChange(ByRef strTxt1 As String)    On Error GoTo err_subChange    Dim X As Integer
        Dim strTxt2 As String
        Dim strA As String
        Dim strB As String
        
        strTxt2 = ""
        
        X = InStr(strTxt1, "'")
        
        While X <> 0
            X = InStr(strTxt1, "'")
            
            If X = 0 Then
                strTxt2 = strTxt2 + Right(strTxt1, Len(strTxt1) - X)
                strTxt1 = strTxt2
            Else
                strTxt2 = strTxt2 + Left(strTxt1, X - 1) + "\'"
                strA = Left(strTxt1, X - 1)
                strB = Right(strTxt1, Len(strTxt1) - X)
                strTxt1 = Right$(strTxt1, Len(strTxt1) - X)
            End If
        Wend
            
        Exit Suberr_subChange:
        Call subCheckError(Err)End Sub