ODBC/SQL authentication without storing credentials in model
I am relaying a question from a user here.
We have a model that executes many separate calls to DbWrite and DbQuery. If we do not put the user credentials in the connection string, it asks us over and over to enter the SQL username and password, i.e., every time it evaluates a DbWrite or DbQuery. If we include user credentials in the connection string, it runs without asking, but I don't want my credentials saved with the model. Is it possible to ask the user once to enter her credentials, and then not ask again after that, but do so in a way that does not save those credentials with the model when she saves the model?
One approach is to use AskMsgText to get the credentials. You would change your Connection_string variable's Definition to something like:
Local userName := AskMsgText("SQL user name:","Database credentials needed"); Local pwd := AskMsgText("SQL password:","Database credentials needed",password:true); f"Driver={{ODBC Driver 17 for SQL Server};Server=myServername\SQLEXPRESS;Database=myDataBase;UID={userName};PWD={pwd};"
Currently viewing this topic 1 guest.
- 4 Forums
- 87 Topics
- 283 Posts
- 1 Online
- 1,874 Members