15,898,538 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10250878 (Top 4 by date)
Member 10250878
12-Sep-15 13:20pm
View
1) I connect using the default authentication which is Windows auth.
2) In the app there is a window that creates sql server login. On the submit button, it creates the login and gets the username and the login password from the textbox.
3) My code changes the connection string after creating the login(integrated security=false). Which means I can only login with credentials or sql server authentication.
Thats the process it follows. Then if I try to login it won't connect because I need to alter or change the login password. I wrote an alter query in my wpf app and it didn't work. Then I had to go 2 sql management studio to alter my login and tried it again in my wpf app, then it works.
I know your a little confused but the app works like sql management studio where you need to connect to a server first before you can do anything.
Member 10250878
12-Sep-15 9:56am
View
Hi mika, I can login from my app using windows authentication and sql server authentication only when i change my password in management studio. My code changes the integrated security at runtime and also generate connection strings. Its purpose is to support online or local (multiuser) connections. But, I am trying to change my password of my login I created in windows authentication mode and log in with the credentials In sql server authentication mode.
Member 10250878
12-Sep-15 9:22am
View
Not still working.
I wrote this code in c# using sqlcommand object and it works. But, when I try to login with the credentials in my app, it doesn't work. It only works if I change my password or alter my password in sql management studio.
sqlcommand.commandTest:
CREATE LOGIN remoteUser
WITH PASSWORD = 'mypass123'; GO
-- Creates a database user for the login created above. CREATE USER remoteUser FOR LOGIN remoteUser GO
Member 10250878
20-Apr-15 15:48pm
View
I just forget about the "where not exists" syntax. Anyways, i created a stored procedure for it and i used EF to call it.
Regards.