SQLConnection to database in repetitive
ScheduledTask. To prevent creation of new connections, and to maintain binding of connection to same symbol I made the following:
If[MatchQ[conn, _SQLConnection], If[SQLConnectionOpenQ[conn], If[(! SQLConnectionUsableQ[conn]), CloseSQLConnection[conn]; conn = OpenSQLConnection[conn];], conn = OpenSQLConnection[conn];], conn = OpenSQLConnection["demo"];]
How to make the same procedure, but with usage of
conn symbol only on one place, NOT as above with
conn on 9 places?