Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nizam
Starting Member
15 Posts |
Posted - 2005-10-03 : 21:25:45
|
| hi........i'm using ms sql server as my database in vb program.......the problem is, my connection string........i can understand even if i put a wrong user id and password it still can excess my database..............this is my connection string:- constr = "Provider=SQLOLEDB;Integrated Security=SSPI;Data Source=JOHN\NIZAM;Extended Properties=" & Chr$(34) & "DRIVER={SQL SERVER};DESC=;DATABASE=" & db_name & ";SERVER=" & db_server & ";UID=" & db_user & ";PASSWORD=" & db_pass & ";PORT=" & db_port & ";OPTION=16387;STMT=;" & Chr$(34) how can this string define my user id and password? |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-10-03 : 21:44:41
|
i'm not even sure if the string you provided works but to answer your question, supply the db_user and db_pass for user/passwordquote: Originally posted by nizam ";UID=" & db_user & ";PASSWORD=" & db_pass
--------------------keeping it simple... |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-10-03 : 21:46:20
|
| You should ask yourself a question: Did I code this?1. If yes, go to www.connectionstrings.com and start reading. Shoot yourself.2. If no, shoot the other person.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2005-10-03 : 22:12:50
|
The answer though....You are using SSPI which uses your windows account to authenticate you. This overrides anything you supply as a uid / password.You should visit connectionstrings.com to find out more about the right connection string.Don't worry about Derrick, he's just cranky because his hair is getting pointier. Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2005-10-03 : 22:23:02
|
quote: Originally posted by derrickleggett You should ask yourself a question: Did I code this?1. If yes, go to www.connectionstrings.com and start reading. Shoot yourself.2. If no, shoot the other person.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA.
bahhaaahaha. that was really funny derrick. Nerd humor, you gotta love it. -ec |
 |
|
|
nizam
Starting Member
15 Posts |
Posted - 2005-10-06 : 04:46:33
|
| thanks guy..........u all just solve my problem.........i should shoot "that other person".......hahahaha |
 |
|
|
|
|
|