List:MySQL ODBC« Previous MessageNext Message »
From:Philip A. Chapman Date:May 11 1999 9:11pm
Subject:Re: Connecting to MySQL using Access and VBA
View as plain text  
I think you may be right.  I have been trying to validate user sign-in 
by those user ID's and passwords used to log into the MySQL server.
Since I am not aware of a function which decrypts the password stored
in password of user in the mysql database, pulling the data down into a
local table could be difficult or a security problem.  I may have to 
re-evaluate how it all is to be done and totally redesign the process.
I appreciate the answer to my post.   You have certainly given me
something useful to think about.  I was concentrating so hard on 
getting ODBC to act like I wanted it that I had not considered other
options.

Phillip Grant wrote:
> 
> Hey Philip,
> 
> I think I responded to you previously, so if I repeat myself, please forgive
> me.  It sounds as if what you are going to have to do is validate the User
> ID and Password in your VBA code *before* attempting to call
> wsTemp.OpenDatabase().
> 
> It would be my suggestion to either store these values as constants (worse
> case) in your code, or in a local application table.  Then you could
> validate against it, then call OpenDatabase, if they "pass muster".
> 
> If these are individual user id's and passwords that are stored on MySQL,
> then you'll need an admin module that pulls them down into your local
> validation table on a periodic basis.  If, on the other hand, this is one
> application specific user id/password login, then the local table/variable I
> mentioned would the most expedient.
> 
> Hope this helps,
> 
> Phillip
> 
> -----Original Message-----
> From: Philip A. Chapman [mailto:pchapman@stripped]
> Sent: Tuesday, May 11, 1999 1:42 PM
> To: monty@stripped
> Cc: pgrant@stripped; myodbc@stripped
> Subject: Re: Connecting to MySQL using Access and VBA
> 
> Thank you for replying to my post.  However, I did try using the
> dbDriverNoPrompt option of the OpenDatabase Method.  Here is a snippet
> of the MSAccess VBA code I am attempting to use:
> 
>   ' Build connect string
>     gstrdbATSConnect = "ODBC;DSN=ServerConnect" & _
>                        ";DB=dbATS" & _
>                        ";SERVER=0.0.0.0" & _
>                        ";PORT=" & _
>                        ";FLAG=2" & _
>                        ";STMT=" & _
>                        ";UID=" & gstrUser & _
>                        ";PWD=" & gstrPassword
> 
>   ' Connect to the server
>     Set wsTemp = DBEngine(0)
>     Set dbServer = wsTemp.OpenDatabase("", dbDriverNoPrompt, False, _
>                                        gstrdbATSConnect)
> 
> If you are interested in a larger sampling of the code I am using, it
> was included in the message I sent at the beggining of the thread.  If
> you would like, I could email it to you.
> 
> If you have any other suggestions, I would be most gratefull.  Thanks.
> 
> Michael Widenius wrote:
> >
> > >>>>> "Philip" == Philip A Chapman
> <pchapman@stripped> writes:
> >
> > Philip> I don't have a problem connecting if the user supplies the correct
> UserID and
> > Philip> PassWord.  The problem is that the MyODBC driver dialog box
> displayes if they
> > Philip> give an incorrect UserID or PassWord.  I want my error trapping to
> catch that
> > Philip> and attempt up to three tries, where the user is requeried for
> UserID and
> > Philip> PassWord.  As it is now, if they enter an incorrect UserID the
> dialog box
> > Philip> will display.  If they then enter a correct ID and password in the
> MyODBC
> > Philip> driver dialog, it connects.  If they supply the incorrect values
> in the
> > Philip> MyODBC driver dialog as well, or click Cancel, then control is
> returned to my
> > Philip> code and error trapping runs.
> >
> > Hi!
> >
> > MySQL will only display the prompt if you call it with:
> >
> > fDriverCompletion == SQL_DRIVER_COMPLETE
> > or
> > fDriverCompletion == SQL_DRIVER_COMPLETE_REQUIRED
> >
> > (fDriverCompletion is the last argument to SQLDriverConnect)
> >
> > Try calling it it with SQL_DRIVER_NOPROMPT
> >
> > Regards,
> > Monty
> 
> --
> Philip A. Chapman
> Programmer/Analyst for Alliance TeleSolutions
> 
> Visit our Website at http://www.ats-telsol.com

-- 
Philip A. Chapman
Programmer/Analyst for Alliance TeleSolutions

Visit our Website at http://www.ats-telsol.com
Thread
Connecting to MySQL using Access and VBAPhilip A. Chapman6 May
  • RE: Connecting to MySQL using Access and VBAPhillip Grant6 May
    • Re: Connecting to MySQL using Access and VBAPhilip A. Chapman6 May
      • Re: Connecting to MySQL using Access and VBAMichael Widenius11 May
    • Re: Connecting to MySQL using Access and VBAPhilip A. Chapman11 May
      • RE: Connecting to MySQL using Access and VBAPhillip Grant12 May
        • Re: Connecting to MySQL using Access and VBAPhilip A. Chapman12 May