SQL Server login Form For access

R

Rudi Groenewald

Hi there...

I use SQL server integrated security so when a user opens a database in
access it prompts the username & password in a small popup box on
connection, but I'd like to use my own customised form for the
authentication process, is this possible? I do know that this login popbox
is displayed before any forms are loaded, can it be said that on database
conenct that the form is opened? How will I transfer the values entered into
the login form to the sql server for authentication?

Thanks alot in advance
Rudi Groenewald
 
B

Ben

With integrated security I really don't think you can do what you are
asking. The idea behind integrated security is that the Windows logon
account the user has for the machine also logs them on to SQL Server,
there is not need to enter authentication information. If the users are
getting a login box, chances are that you have SQL security or you have
not specified integrated security in your connection string (which I
think would cause an error). You can create your own by creating a form
asking for the authentication information and storing it in variables,
then concatenate the values into your connection string.
Alternately, if you are using linked tables, check the 'Save password
information' box when linking so creditials only need to be supplied once.

HTH
Ben
 
R

Rudi Groenewald

hi ben...
Sorry, that was what I meant. If I use SQL security, I need to to popup my
form to ask for the username and password of the user, not only the msgbox
that pops up asking for it, how will I do this?

Thanks
Rudi
 
B

Ben

What you'll probably want to do is show a form early in the application
(like during the start-up), before any connection is made to the
database, that asks for the user id and the password. Generate a
connection string (probably gloabl) that concatenates this information
in, and use that string to open any connections. There are two big
benefits to this approach - your users aren't bothered by login boxes,
and you take advantage of connection pooling.

So, very early in the function that is called from your AutoExec macro
pop a form asking for this information and build the connection string,
this variable should probably have global scope.

Something I just thought of, if you're using an Access Project (adp)
this might not be possible. I think Access will attempt to make the
connections on start up.

HTH,
Ben
 
R

Rudi Groenewald

Yeah I'm using adp, thanks alot tho

Ben said:
What you'll probably want to do is show a form early in the application
(like during the start-up), before any connection is made to the
database, that asks for the user id and the password. Generate a
connection string (probably gloabl) that concatenates this information
in, and use that string to open any connections. There are two big
benefits to this approach - your users aren't bothered by login boxes,
and you take advantage of connection pooling.

So, very early in the function that is called from your AutoExec macro
pop a form asking for this information and build the connection string,
this variable should probably have global scope.

Something I just thought of, if you're using an Access Project (adp)
this might not be possible. I think Access will attempt to make the
connections on start up.

HTH,
Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top