PrepAway - Latest Free Exam Questions & Answers

What should you do connect to the Sales database when the user account for the connection is SalesUser?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.

The application is used to retrieve records from a database named Sales. The database resides on a Microsoft SQL Server 2005 server named ProdServer.
The application connects to the database by using an instance of the SqlConnection class that has the following connection string.

“Data Source=ProdServer;UID=SalesUser;PWD=Pa$$w0rd;”

When the application calls the Open method of the SqlConnection object, the following exception is thrown:

“Cannot open user default database. Login failed. Login failed for user ‘SalesUser'”.

The default database for SalesUser is Sales.

You need to ensure that you can connect to the Sales database when the user account for the connection is SalesUser.

What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Create a login for SalesUser on ProdServer.

B.
Create a database user object in the Sales database. Map the object to the SQL Server 2005 login of SalesUser.

C.
Modify the connection string in the following manner.
“Server=ProdServer;Database=Sales;UID=SalesUser;PWD=Pa$$w0rd;”

D.
Modify the connection string in the following manner.
“Data Source=ProdServer;Initial Catalog=Sales;UID=SalesUser; PWD=Pa$$w0rd;”


Leave a Reply