Page 1 of 1 1
Topic Options
#114391 - 2004-02-19 04:34 PM connection strings
tr6boy Offline
Starting to like KiXtart

Registered: 2001-10-24
Posts: 131
I'm using the following line to connect to a database to write some information on logon.
Code:
 
$objConn=DBConnOpen('DRIVER={SQL Server};SERVER=SQLSERVER;UID=me;PWD=password;DATABASE=database1')



That all works fine, but what are my options (if any) if I want to not expose the connection's user name and password in the text of my KiXtart code?

Thanks!

Top
#114392 - 2004-02-19 04:41 PM Re: connection strings
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
It is highly recommeded to only use "Windows Authentication" and not "SQL Server Authentication" when connecting to Microsoft SQL Server. Then you would not need to use a username/password combination as Windows would take care of the authentication part automatically.
_________________________
There are two types of vessels, submarines and targets.

Top
#114393 - 2004-02-19 04:45 PM Re: connection strings
tr6boy Offline
Starting to like KiXtart

Registered: 2001-10-24
Posts: 131
OK, so as long as the user logging in has the right to write to that database via his/her windows login, I just omit the SQL user account & password from the string? (Just want to amke sure I'm understanding you correctly)...

Thanks sealeopard!

Top
#114394 - 2004-02-19 04:47 PM Re: connection strings
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Yes, you'd create a group on the SQL Server with appropriate rights and then add the users into that group. Then the user will get authenticated automatically based on username/password/groupmembership and the UID/PWD fields in the connection string are superfluous.
_________________________
There are two types of vessels, submarines and targets.

Top
#114395 - 2004-02-19 04:51 PM Re: connection strings
tr6boy Offline
Starting to like KiXtart

Registered: 2001-10-24
Posts: 131
Perfect - thanks so much!
Top
#114396 - 2004-02-19 04:56 PM Re: connection strings
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think I read about this the other day - http://www.connectionstrings.com

If you happen to lose a connection string.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#114397 - 2004-02-19 06:41 PM Re: connection strings
tr6boy Offline
Starting to like KiXtart

Registered: 2001-10-24
Posts: 131
Yep, I think you or Jens mentioned that in another posting to me. Very helpful site to me lately...
Top
#114398 - 2004-02-20 12:49 AM Re: connection strings
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
It was Jens.. That is too cool!

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.055 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org