Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have SQL Server 2014 and I made a system using VBNET 2015 in PC1. Then I connect my database through WLAN in PC2.. The SQL Server 2014 of PC2 is now allowed to open my database and its tables.. So, I open the .exe files of my program in Debug folder using PC2.. I made a Login Form in the program that I made but everytime I log in the error occurs saying

VB
" Cannot open database "NEWCMO" requested by the login. The login failed. Login failed for user "ACE\LOUSA""


What I have tried:

I never try anything but to access only by PC2 the database of PC1
Posted
Updated 7-Mar-17 6:02am
Comments
Dave Kreskowiak 7-Mar-17 10:00am    
Show us the connection string you're using. Chances are really good your PC's are NOT in an Active Directory and you're using a Trusted Connection, which won't work in your situation.
OriginalGriff 7-Mar-17 10:02am    
Absolutely!
Member 12905345 7-Mar-17 11:33am    
"Server=.\SQLEXPRESS;database =NEWCMO; integrated security=True; "
Dave Kreskowiak 7-Mar-17 12:38pm    
First, if you're going to talk about SQL Server, you MUST sya you're using the Express edition. Things are setup quite a bit differently under Express than they are under the full Server versions.

Next, Express doesn't allow remote connections by default and, since that is a named instance ("SQLEXPRESS"), it doesn't listen on port 1433.

If you've got the SQL Server Management Tools installed with your Express installation, setting this up is easy. Just follow this guide[^].
Member 12905345 7-Mar-17 12:53pm    
I am using SQL Server express.. I have tutorial on how to open the database of PC1 by PC2 using 1433.. What I am trying to do sir is to allow PC2 to login in my dental system but errors occurs above.

1 solution

Try without integrated security, ie create a SQL User with a username and password via the SQL Server Management Studio and add the credentials to the connection string. See "Standard security" in the following link

.NET Framework Data Provider for SQL Server Connection Strings - ConnectionStrings.com[^]
 
Share this answer
 
Comments
Member 12905345 7-Mar-17 12:33pm    
So, I created Assisstant as User under of Security of my Database..

Server=.\SQLEXPRESS;database =NEWCMO;User Id=Assisstant; Password=glen;

is it correct?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900