Advertisement

02.05.2008 at 01:52AM PST, ID: 23137514
[x]
Attachment Details

Need help with Sql Server connection string

Asked by fosiul01 in Visual Studio .NET 2005, Programming for ASP.NET, .Net Editors & IDEs

Tags: vb.net 2005(Web programming)

HI,
I am copying some code from another uses software to my project and i am quite new in vb.net

from the user code, the connection string is :

 BCon = New sqlConnection("data source=micron;uid=sa;pwd=admin;initial catalog=gsmlanka")
 cartCon = New sqlConnection("data source=micron;uid=sa;pwd=admin;initial catalog=gsmlanka")
I can see, he used sql server username and password for his development
but in my pc , i am using sqlserver but windows authentication

I am trying with bellow code but its not working :


BCon = New sqlConnection("Data Source=GRAPHICS\sqlexpress;initial catalog=gsmlanka;Integrated Security=True")
 cartCon = New sqlConnection("Data Source=GRAPHICS\sqlexpress;initial catalog=gsmlanka;Integrated Security=True")

Error is below :

Cannot open database "gsmlanka" requested by the login. The login failed.
Login failed for user 'GRAPHICS\ASPNET'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "gsmlanka" requested by the login. The login failed.
Login failed for user 'GRAPHICS\ASPNET'.


Do i need to give some permission ?


but its not working , can any one tell me where i am doing wrong?
Start Free Trial
 
Loading Advertisement...
 
[+][-]02.05.2008 at 01:53AM PST, ID: 20821738

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 02:03AM PST, ID: 20821772

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 02:19AM PST, ID: 20821827

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 02:33AM PST, ID: 20821870

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 02:38AM PST, ID: 20821891

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 02:42AM PST, ID: 20821905

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 03:02AM PST, ID: 20821987

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 03:16AM PST, ID: 20822030

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 03:19AM PST, ID: 20822040

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 03:27AM PST, ID: 20822070

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.05.2008 at 04:46AM PST, ID: 20822423

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Studio .NET 2005, Programming for ASP.NET, .Net Editors & IDEs
Tags: vb.net 2005(Web programming)
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.05.2008 at 04:54AM PST, ID: 20822452

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628