<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="security" content="public" /> <meta name="Robots" content="index,follow" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> <meta name="DC.Type" content="reference" /> <meta name="DC.Title" content="Signon dialog behavior" /> <meta name="abstract" content="The signon dialog behavior has been simplified from the behavior seen in previous iSeries Access for Windows ODBC drivers. The signon dialog behavior is based on how your data source is set up and which ODBC API (SQLConnect, SQLDriverConnect, SQLBrowseConnect) your application uses to connect." /> <meta name="description" content="The signon dialog behavior has been simplified from the behavior seen in previous iSeries Access for Windows ODBC drivers. The signon dialog behavior is based on how your data source is set up and which ODBC API (SQLConnect, SQLDriverConnect, SQLBrowseConnect) your application uses to connect." /> <meta name="DC.Relation" scheme="URI" content="rzaikodbcapifunctions.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="signon" /> <meta name="DC.Language" content="en-us" /> <!-- All rights reserved. Licensed Materials Property of IBM --> <!-- US Government Users Restricted Rights --> <!-- Use, duplication or disclosure restricted by --> <!-- GSA ADP Schedule Contract with IBM Corp. --> <link rel="stylesheet" type="text/css" href="./ibmdita.css" /> <link rel="stylesheet" type="text/css" href="./ic.css" /> <title>Signon dialog behavior</title> </head> <body id="signon"><a name="signon"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">Signon dialog behavior</h1> <div><p>The signon dialog behavior has been simplified from the behavior seen in previous iSeries™ Access for Windows<sup>®</sup> ODBC drivers. The signon dialog behavior is based on how your data source is set up and which ODBC API (SQLConnect, SQLDriverConnect, SQLBrowseConnect) your application uses to connect.</p> <div class="section"><div class="p">When configuring an ODBC data source there are two options which can influence the signon dialog behavior. These are both located on the dialog you get after clicking <span class="uicontrol">Connection Options</span> on the <span class="uicontrol">General</span> tab of the DSN Setup GUI. <div class="note"><span class="notetitle">Note:</span> On the DSN setup GUI there is an option which controls whether or not a dialog prompting for signon information is allowed or not. An application that calls SQLConnect in a 3-tier environment should always choose 'Never prompt for SQLConnect'. This 3-tier application also needs to make sure it specifies the userid and password when calling SQLConnect. </div> </div> <ul><li> In the <strong>Default user ID</strong> section you can specify which default user ID to use: <ul><li>Use Windows user name</li> <li>Use the user ID specified below</li> <li>None</li> <li>Use iSeries Navigator default</li> <li>Use Kerberos principal</li> </ul> </li> <li>In the <strong>Signon dialog prompting</strong> section you can specify if the signon dialog should be prompted if your application uses the SQLConnect ODBC API. </li> </ul> </div> <div class="section"><p> When coding your application you have total control over how the userid, password, and signon dialog prompting will behave. The userid and password that is used is figured out in the following order: </p> </div> <div class="section"> <ol><li>Userid / Password arguments specified by the application. <ul><li>The SQLConnect API accepts <span>userid</span> and <span>password</span> arguments.</li> <li>The SQLDriverConnect and SQLBrowseConnect APIs accept the <span>UID, PWD, and SIGNON </span>connection string keywords.</li> </ul> </li> <li>GUI setting for Default user ID </li> </ol> </div> <div class="section"><p>The signon dialog prompting depends on which ODBC API is used by the application to connect. SQLConnect prompts the signon dialog if needed unless the GUI setting for Signon dialog prompting says to never prompt. SQLDriverConnect prompts the signon dialog according to the value of the DriverCompletion. A setting of SQL_DRIVER_NOPROMPT will prevent any signon dialogs from being prompted. A setting of SQL_DRIVER_PROMPT, SQL_DRIVER_COMPLETE or SQL_DRIVER_COMPLETE_REQUIRED will prompt the signon dialog if needed. SQLBrowseConnect prompts the signon dialog if needed.</p> </div> <div class="section"><h4 class="sectiontitle">ActiveX Data Objects (ADO) prompting</h4><p>When coding your ODBC application using ActiveX Data Objects (ADO) the default behavior for prompting is <span class="uicontrol">adPromptNever</span>. To prompt differently, set the Prompt property on the Connection object prior to calling the Connection's Open method. For example, the following ADO code would result in prompting only as needed. Adding the SIGNON, UID, or PWD keywords allow you to have more control over the amount of prompting. </p> <pre>Dim conn As New ADODB.Connection conn.Properties("Prompt") = adPromptComplete conn.Open "Provider = MSDASQL;DSN=myODBCDSN; </pre> </div> </div> <div> <div class="familylinks"> <div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikodbcapifunctions.htm" title="Learn about implementations issues when using ODBC APIs.">Implementation issues of ODBC APIs</a></div> </div> </div> </body> </html>