SQL Anywhere Version 220.127.116.1194
I’m interested in using the dbo.sa_post_login_procedure in a client application using an ODBC connection. What process would I use to select the message_text and message_action? Of course I could select * from dbo.sa_post_login_procedure after a connection but that wouldn’t work if the procedure was modified with the SET OPTION PUBLIC.post_login_procedure command. I’m interested in this being portable across databases. If the answer is I have to first SELECT CONNECTION_PROPERTY ( XYZ ), I think that's to much work.
On another note I was reviewing the dbo.sa_post_login_procedure in this version and can’t see how it works with the clause where login_policy_name = 'default' since the default login_policy_name is ‘root’.
Finally, whats with this not being able to type in plain text
asked 05 Feb '15, 21:40
Okay ... You can enquire the database option for that using the function db_property( 'post_login_procedure' ) and form the string 'call ' or 'select * from ' to pass to execute immediate.
The following works well enough in my QnD test in dbisql:
execute immediate with result set on string( 'select * from ', connection_property( 'post_login_procedure' ), '()' );
execute immediate with result set on string( 'call ', connection_property( 'post_login_procedure' ), '()' );
answered 06 Feb '15, 11:33
Nick Elson S...