<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Authenticate DBC user and pass before storing them for future use in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/596005#M79978</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am writing some code to pull data from an ODBC connection. I want to test if the username and password entered are valid. The script is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dbc = Create Database Connection("Driver={Oracle in instantclient11_1}; DBQ=" || target || "; UID=" || user || ";PWD=" || pass || ";FBS=12800000;");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I found some solutions suggesting checking if&amp;nbsp;&lt;STRONG&gt;dbc&lt;/STRONG&gt;&amp;nbsp;is empty to see if the connection was created as a way to check for the correct user and pass. However, when I enter the incorrect details for the username and password, I get an ODBC prompt to enter the correct username and password. I do not want this prompt and would like the script to run and return an empty &lt;STRONG&gt;dbc&lt;/STRONG&gt; object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scripting index says I can use a boolean value after the connection string to disable the prompt:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dbc = Create Database Connection("Driver={Oracle in instantclient11_1}; DBQ=" || target || "; UID=" || user || ";PWD=" || pass || ";FBS=12800000;", 0);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, running the above code results in the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Expecting DriverPrompt Boolean argument&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the same error if I use &lt;STRONG&gt;true&lt;/STRONG&gt;, &lt;STRONG&gt;false&lt;/STRONG&gt; or &lt;STRONG&gt;As Boolean(0).&amp;nbsp;&lt;/STRONG&gt;Any help to solve this will be great. Alternatively, any other suggestions to validate the username and password for a DB connection are welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:39:16 GMT</pubDate>
    <dc:creator>SivaSubram5313</dc:creator>
    <dc:date>2023-06-08T16:39:16Z</dc:date>
    <item>
      <title>Authenticate DBC user and pass before storing them for future use</title>
      <link>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/596005#M79978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am writing some code to pull data from an ODBC connection. I want to test if the username and password entered are valid. The script is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dbc = Create Database Connection("Driver={Oracle in instantclient11_1}; DBQ=" || target || "; UID=" || user || ";PWD=" || pass || ";FBS=12800000;");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I found some solutions suggesting checking if&amp;nbsp;&lt;STRONG&gt;dbc&lt;/STRONG&gt;&amp;nbsp;is empty to see if the connection was created as a way to check for the correct user and pass. However, when I enter the incorrect details for the username and password, I get an ODBC prompt to enter the correct username and password. I do not want this prompt and would like the script to run and return an empty &lt;STRONG&gt;dbc&lt;/STRONG&gt; object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The scripting index says I can use a boolean value after the connection string to disable the prompt:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dbc = Create Database Connection("Driver={Oracle in instantclient11_1}; DBQ=" || target || "; UID=" || user || ";PWD=" || pass || ";FBS=12800000;", 0);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, running the above code results in the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Expecting DriverPrompt Boolean argument&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the same error if I use &lt;STRONG&gt;true&lt;/STRONG&gt;, &lt;STRONG&gt;false&lt;/STRONG&gt; or &lt;STRONG&gt;As Boolean(0).&amp;nbsp;&lt;/STRONG&gt;Any help to solve this will be great. Alternatively, any other suggestions to validate the username and password for a DB connection are welcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:39:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/596005#M79978</guid>
      <dc:creator>SivaSubram5313</dc:creator>
      <dc:date>2023-06-08T16:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticate DBC user and pass before storing them for future use</title>
      <link>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/596130#M79986</link>
      <description>&lt;P&gt;Potential answer: I think &lt;A href="https://community.jmp.com/t5/Discussions/Database-Connection-with-login-prompt/td-p/86285" target="_self"&gt;this link&lt;/A&gt; might be helpful for what you're trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Word of caution: Your IT and/or Security departments might have issues with storing credentials. Prudent behavior would likely include their input, when/if applicable.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 19:57:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/596130#M79986</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2023-02-01T19:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticate DBC user and pass before storing them for future use</title>
      <link>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/597944#M80156</link>
      <description>&lt;P&gt;Hi Jed, Thanks for the reply. I don't want to store passwords and share even if its in an encrypted file. I just want to save the user and pass to a local location or for example using powershell credential manager in the user's PC (I have seen implementations of this in the community posts). Our DB credentials expire every few months, so I wanted a way to check if the stored password works every time a connection is tried for the first time in a JMP session and if not, prompt a login window.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 12:52:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Authenticate-DBC-user-and-pass-before-storing-them-for-future/m-p/597944#M80156</guid>
      <dc:creator>SivaSubram5313</dc:creator>
      <dc:date>2023-02-07T12:52:53Z</dc:date>
    </item>
  </channel>
</rss>

