Question Sql authentication

jerrykeeel

New member
Joined
May 20, 2010
Messages
2
Programming Experience
1-3
Hello.

I have an SQLServer 2005 dbase and I want to connect to it with a
window form app.

When I setup the connection, I tell the wizard not to include the password in the connection string.

So, when I run the app I get an Authentication failed message.

Is there a way to set up an SQL login when the application starts, so that I won't have to include it in the connection string?
 
If the password isn't stored in the connection string, which I assume is stored in the config file, then you have three choices:

1. Prompt the user for the password every time you connect to the database.

2. Prompt the user for the password every time you start the app. Keep the password in memory for the current session and then discard it when the app exits.

3. Prompt the user for the password the first time you start the app and then store it somewhere outside the app, e.g. a file. If you want the password secured then you'd have to protect it somehow, most likely using encryption.
 
the question is how...

Thank you for your reply...

The option I am interested in is prompting the user each time the app starts for the password and keeping it in memory until the app exits.

the problem is.. I don't know how to do this.

is there a way I can pull up the sql login window?
(the previous front end app was in MSaccess 2003 and would pull up
the sql login window..)

If not, I suppose I have to create my own login form.
How do I transfer the value of a text box to the sql server?
I am not very experienced with Vbasic so any help would be appreciated since I can't find information on that anywhere...


thank you.
 
Back
Top