Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login issue. 1

Status
Not open for further replies.

Jonah86

Programmer
Dec 11, 2003
152
US
I'm using a database in MySQL for my program. I'm not sure if I should have this question here or in the MySQL forum, either way maybe some of you have seen this issue.

The database has a required login whenever it is accessed. So, when I open my application it asks me to log in...not a login that I made, one that gets created. My problem is, when you put in a wrong name/pass combo it gives series of annoying errors that scare users. I get reports every day about these errors and I was wondering if there is any way to handle that error. I'm not sure how since it's not using any code or forms that I made. I figure there must be some way, but I'm pretty much at a loss.

Thanks.
 
You need a TDatabase component in your app. In design time, make sure none of the DB components are set Active := true or Connected := true, as these will bring up the login prompts at runtime.

You could generate your own login screen and then in the TDatabase's OnLogin event, set the username and password equal to what the user entered. Then set connected := true for the TDatabase, that should solve the problems.

BTW, I'm talking BDE here, are you using it or ADO?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top