Psqlodbc 7.1.11 - Mailing list pgsql-odbc

From Simeo Reig
Subject Psqlodbc 7.1.11
Date
Msg-id 006901c1c6e2$a9543060$0a00a8c0@win2000
Whole thread Raw
In response to Problem with VB-DirectODBC selecting text-fields [EBEWE: Virus checked]  (Wolfgang.Fuertbauer@ebewe.com)
Responses Re: Psqlodbc 7.1.11
List pgsql-odbc
Hi, with psqlodbc 7.1.9 an attempt to write to a table that the current user
doesn't have enought privilege raise error
number -2147467259 and err.description contains "Permission denied", with
psqlodbc 7.1.11 it raise the same err number
but text has changed to "Error while executing the query", that is less
descriptive and I need a descriptive text because error number
-2147467259  is raised for various errors (emty row, referential integrity
violation, duplicate key ...) .

Is this a bug ? How can I know the correct error ?

Thanks

(extract of a class to trap errors)

  Select Case Err.Number
        Case -2147217864 'the row has changed
            msgbox "El registre ha canviat mentres s'editava," & Chr$(13) &
_
            "cancel.li els canvis i torni a recuperar el registre " &
Chr$(13) & _
            "(Els seus canvis es perdràn)", vbExclamation + vbOKOnly, "Barra
Grid"
            Resume Next

         Case -2147467259

            If InStr(1, Err.Description, "Empty row cannot be inserted",
vbTextCompare) > 0 Then
                MsgBox "No es pot afegir un registre buit !"
                ErrorTrobat = True
            End If

            If InStr(1, Err.Description, "Fail to add null value in not
null", vbTextCompare) > 0 Then
               MsgBox "Falten Camps Obligatoris"
               ErrorTrobat = True
            End If

            If InStr(1, Err.Description, "referential integrity violation",
vbTextCompare) > 0 Then
                MsgBox "No es pot esborrar, hi ha registres relacionats a
altres taules"
                ErrorTrobat = True
            End If

            If InStr(1, Err.Description, "cannot insert a duplicate key into
unique index", vbTextCompare) > 0 Then
                MsgBox "No es pot realizar l'operació, crearia valors
duplicats"
                ErrorTrobat = True
            End If

            If InStr(1, Err.Description, "Permission denied", vbTextCompare)
> 0 Then
               MsgBox "No té permisos per ha crear nous registres i/o
modificar-los."
               ErrorTrobat = True
            End If

            If InStr(1, Err.Description, "you don't have permissions to set
sequence", vbTextCompare) > 0 Then
               MsgBox "No té permisos per ha modificar la sequència."
               ErrorTrobat = True
            End If

            If ErrorTrobat = False Then
                MsgBox "Error Inesperat " & Err.Description & Err.Number
            End If

        Case Else
            MsgBox "Error numero :" & Err.Number & " descripcio :" &
Err.Description
    End Select


pgsql-odbc by date:

Previous
From: Eric Webber
Date:
Subject: Re: [GENERAL] ODBC from win2k to postgres on Linux HELL
Next
From: "Hiroshi Inoue"
Date:
Subject: Re: Psqlodbc 7.1.11