| Author |
Topic |
|
stevenchoon
Starting Member
8 Posts |
Posted - 2006-05-28 : 21:28:11
|
| Dear everyone,Me agains,i have a problems in my sql server 2005 Authenticationcant anyone tell me how to set the SQL authentication for server 2005?i use the following coding for connection but it cant log to my sql server...Conn.Open "Provider=SQLOLEDB;Data Source=WIN-40508040D1F\SQLEXPRESS;UID=sa;PWD=693087;DATABASE=Hotel"the error saidLogin failed for user 'sa'. The user is not associated with a trusted SQL Server connection.how 2 set the proper UID and PWD?thanks in advance.. steven |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-28 : 21:38:57
|
open ssms, right click the server name, then select propertiesgo to security and change to sql server and windows authentication mode for server authenticationalso, create a proper sql login instead of using sa --------------------keeping it simple... |
 |
|
|
stevenchoon
Starting Member
8 Posts |
Posted - 2006-05-28 : 22:11:10
|
| Dear jen,Thanks for replying me,i follow ur stepwhich i change to sql server and windows authentication mode for server authenticationfor creating the proper sql login,I go 2 security in the server which security>login>sai try change the password at their but it dont work...did i do that things right?can you tell how to create the proper sql login.thank...steven |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-28 : 22:24:08
|
go to security, logins, right click on the right pane, add new loginit also helps to check BOL for more information --------------------keeping it simple... |
 |
|
|
stevenchoon
Starting Member
8 Posts |
Posted - 2006-05-28 : 23:30:04
|
| Even i create the new login i still cant login with SQL server.i create the new login for "saaa" and put password as 693055 for example.(i click the enforce paasword policy)but when i go 2 the saaa properties, the password is more than 6(lenght)became(11lenght)-is that normal?and when i try to login when open the ssms(their is one pop up login message)i clcik the sql authentication..... d option is emty(or supose their is some login selection) steven |
 |
|
|
cmdr_skywalker
Posting Yak Master
159 Posts |
Posted - 2006-05-29 : 00:23:13
|
| the password is already encrypted, thus, don't expect to you can retrieve it using SSMS. When you say, you can't login, we assume from your code. Where do you exactly run your code, from local machine or from somewhere else? in your workstation, try this, open the the SMS, login as sa/693087 (or the username/password you will use in the app, assuming you have already created them and set the authentication to mixed) and type the WIN-40508040D1F\SQLEXPRESS as your server. Can you connect or does it generate the error?May the Almighty God bless us all! |
 |
|
|
stevenchoon
Starting Member
8 Posts |
Posted - 2006-05-29 : 01:28:44
|
| I run my code on my local mechine,i try open sms before and login as sa/693087(yes, username and password that i use in my app)with that serverit generate the error of "the connection wass success fully create, but error occur during the lohin processno process is in other end of the pipeerror 233.for the "assuming you have already created them and set the authentication to mixed"wuld u mind to teach me how to set the new loging account at the begining.coz the account that i create cant not successfully login in server..did i really miss something??steven |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-05-29 : 02:15:53
|
| when you login using sql authentication on ssms, did you supply the loginame and password?how did that go?--------------------keeping it simple... |
 |
|
|
stevenchoon
Starting Member
8 Posts |
Posted - 2006-05-29 : 03:17:23
|
| Dear everyone,I slove my problems oready,I just simply reinstall the sql server.......i dont know why...but however, thanks a lot for u all.....Here is another question..can we change the pc servics pack 1 to 2 without formating?steven |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-29 : 03:59:12
|
"can we change the pc servics pack 1 to 2 without formating"Yes. Definately KH |
 |
|
|
|