Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: Using python to catch server messages

$
0
0

Hi Alexander,

 

sybpydb requires the Open Client installation of the SDK as it uses this to communicate to the ASE.

You would need the OCS-15_0 libraries/dlls and most likely the charsets/locales/collate folders as well.

 

The mount command appears to print out as info messages (with a TDS_EED token - used to send back messages from ASE - errors and warnings.  Things like print statement are handled as warnings). If doing something like with ODBC you would have to check for return status SQL_SUCCESS_WITH_INFO on the execution and then use the ODBC API calls that print out messages, like SQLGetDiagRec.

 

SO when using something like SQLExecDirect, then use logic like

 

When SQL_SUCCESS_WITH_INFO call on  SQLGetDiagRec( SQL_HANDLE_STMT, hstmt, Record#, SQLState, &NativeError, MessageBuffer, sizeof(MessageBuffer), &MesgLength)

 

Then print out the MessageBuffer.  You would iterate over the records as there might be more than one line of output.

 

I can provide full implementation of this with code if you'd like.

 

Cheers,

-Paul

 

 

 

 



Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>