main logo
Subject: Re: How to kill ODBC login dialog
Author: Mike Devlin
Posted: 2002/04/18 14:17:47
 
View Entire Thread
New Search


<i><font color="#663300"><i><font color="#663300">Hey all,
I have a login screen that uses a SQLCONNECT command to set up the connection to an Oracle database using a functioning data source. I am using the values entered by the user in text boxes as the values being used in the SQLCONNECT function to test if the data entered is for a valid user. Everything works perfectly, except when the user enters invalid user or password information. The problem is this, at the point where the SQLCONNECT fires with invalid parameters, the ODBC login dialog appears. I am using the successful login information to set up the connection information used by all the remote views, and for the GUI security. Unfortunately, I cannot figure out how to stop the login dialog from appearing so I can use my own procedures for handling bad logins. Any ideas would be greatly appreciated.

</font></i>
Mike try adding this before you create the SQL Connection:
SQLSETPROP(0,"DISPLOGIN",3)
SQLSETPROP(0,"DISPWARNINGS",.F.)
Todd Haehn
</font></i>


Hey Todd, and all,
I have those settings in place. The answer is to actually use the connection instead of the data source. I grabbed the entered user id and password and used them to set the properties of the connection. I was trying to use the data source with the SQLCONNECT as a test to see if the user id and password were good before setting the properties in the connection. Just being foolish. Using the connection simply returns negative numbers when the userid and password are invalid, which is the behavior I was looking for. Thanks for the feedback, I never tried the above suggestion, but that is the setting just before the call in the code.
Devman
mdevlin /AT/ ajdebruin D.OT com

 
©2002 Mike Devlin
<-- Prior Message New Search Next Message -->