Connecting Tech Pros Worldwide Help | Site Map

SQL Server login Form For access

Rudi Groenewald
Guest
 
Posts: n/a
#1: Jul 20 '05
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


Ben
Guest
 
Posts: n/a
#2: Jul 20 '05

re: SQL Server login Form For access


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


Rudi Groenewald wrote:
[color=blue]
> 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
>
>[/color]

Rudi Groenewald
Guest
 
Posts: n/a
#3: Jul 20 '05

re: SQL Server login Form For access


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

"Ben" <ben_kneiff@NOSPAMhotmail.com> wrote in message
news:3FC2B596.3010501@NOSPAMhotmail.com...[color=blue]
> 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
>
>
> Rudi Groenewald wrote:
>[color=green]
> > 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[/color][/color]
popbox[color=blue][color=green]
> > is displayed before any forms are loaded, can it be said that on[/color][/color]
database[color=blue][color=green]
> > conenct that the form is opened? How will I transfer the values entered[/color][/color]
into[color=blue][color=green]
> > the login form to the sql server for authentication?
> >
> > Thanks alot in advance
> > Rudi Groenewald
> >
> >[/color]
>[/color]


DCM Fan
Guest
 
Posts: n/a
#4: Jul 20 '05

re: SQL Server login Form For access


Behind the Access login form, in the CLick event of the Login button, you'll
have code like this:

strConnect = "ODBC;DRIVER={SQL
SERVER};SERVER=YourServerName;DATABASE=YourDB;UID= " & txtUID & ";PWD=" & txtPWD

Then you'll need to cycle through the TableDefs Collection and reset the
COnnect properties and use the RefreshLink Method.

Then you'll need to cycle through the QueryDefs collection to reset the Connect
property of any pass-through queries.

If you have any temporary pass-through queries created in code, you'll have to
hold the UID and PWD values in global variables (or better yet, a Class) so
that you can rebuild the connect string on the fly.
Closed Thread