Hi,
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
Best regards
Vianney
POSTGRESQL error handling
Re: POSTGRESQL error handling
if you want to really get actual error from PG then you can consider the below function as the mapping one will not provide proper error message for PG.
bOk = SqlGetError( hSql, nError, strErrorString )
Turns off backend error mapping and reports real backend errors.
bOk = SqlGetError( hSql, nError, strErrorString )
Turns off backend error mapping and reports real backend errors.
Re: POSTGRESQL error handling
hello thanks for the reply. I'll try it.
Best regards.
Best regards.
Re: POSTGRESQL error handling
Hi,
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 ?
best regards
Vianney
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 ?
best regards
Vianney
Re: POSTGRESQL error handling
Hi
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?
Thanks.
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?
Thanks.
Who is online
Users browsing this forum: [Ccbot] and 3 guests