i'm working with pg12 and i would like to find the corresponding error between gupta and odbc on a pg database.
I found the matrix for oracle in the documentation TD Connecting SQLWindows Objects to Databases
bOk = SqlGetError( hSql, nError, strErrorString )
Turns off backend error mapping and reports real backend errors.
So i tried the solution.
I retrieve the good error messge in the variable strErrorString.
But i don't have the good error number in the variable nError. for example i have 39004.
I'm using ODBC 10 (32bits) /postgresql 12/ team developper 7.4
Could you explain me what i've missed ?
I need to manage a specific behavior for the following PG errors :
- 55P03 lock_not_available
- 23505 unique_violation
But the error I receive from the driver is 39004. So I cannot know the exact reason of the error.
Note, for some errors I receive a specific code:
- Division_by_zero I receive 20028
- String_data_right_Truncation 20024
- Invalid_cursor_name : 20034
Is there a way to handle this?
Any configuration of call that allows to retrieve the original error code?
Who is online
Users browsing this forum: [Ccbot] and 2 guests