pgsql-odbc SQLGetDiagRec() API issue - Mailing list pgsql-odbc

From Tukaram Gaikwad
Subject pgsql-odbc SQLGetDiagRec() API issue
Date
Msg-id AM0PR06MB63555EE5C3B67F53DD4E52508FCC0@AM0PR06MB6355.eurprd06.prod.outlook.com
Whole thread Raw
List pgsql-odbc

Hi team,

 

We killed Postgress node and called SQLExecute().

SQLExecute() function fail and return -1, to get diagnostic info I called SQLGetDiagRec()

this function but it gives me SQLState as "00000" which is SQL_SUCCESS,

in failure case which wrong.

 

Actually it should give NO_CONNECTION SQLState.

 

code snippet

 

long retcode = SQLExecute(this->m_OdbcStmt);

 

SQLCHAR     messageText[SQL_MAX_MESSAGE_LENGTH + 1] = {0};

SQLCHAR     state[SQL_SQLSTATE_SIZE + 1] = {0};

SQLSMALLINT textLength = SQL_MAX_MESSAGE_LENGTH + 1;

             

SQLSMALLINT idx = 1;

sqlgetdiagrecret = SQLGetDiagRec(SQL_HANDLE_STMT,

                                                          this->m_OdbcStmt,

                                                          idx,            //record Number

                                                          state,                      //

                                                          &o_errorNo,       //native Error Pointer

                                                          messageText,    //Message Text

                                                          SQL_MAX_MESSAGE_LENGTH + 1, //buffer length

                                                          &textLength     //length of message text

                                                          );

 

Please help us to resolve this issue.

 

 

Regards,

Tukaram Gaikwad

 

+91- 9637996389 (Mobile)

 

amdocs-2017-brand-mark-rgb

 

This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at https://www.amdocs.com/about/email-terms-of-service

Attachment

pgsql-odbc by date:

Previous
From: Ingmar Koecher
Date:
Subject: Crash on Windows Server 2019
Next
From: Tukaram Gaikwad
Date:
Subject: pgsql-odbc SQLGetDiagRec() API issue.