I'm programing my own login screen for my database application (VB6), when the program starts, this login screen appears and retrieves the information about user name and password to connect to the database, but, if this information is wrong, before my error handler show any exception, the default database connection screen appears and let the user retry to connect to the database, that's the screen that I need to avoid show to the user. Somebody can help me?
Here is the code (part):
On Error Goto Error_Handler
.
.
.
Set Cnt = DBEngine.OpenDatabase("pubs", dbDriverNoPrompt, False, "ODBC;DSN=pubs;UID=" + sUser + ";PWD=" + sPwd) 'If this call fails, the program shows the default login screen and let the user retry
.
.
.
Exit Sub
Error_Handler:
MsgBox "<Error>"
Resume Next