473,763 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HELP, The connection string does not work

i am trying to connect to my Sqlserver on my machine.
i tried using the following connection strings

1)

mystring= "Initial Catalog=[SmartLan 2.0 ED];Data
Source=localhos t;Integrated Security=SSPI;U ID='sa';PWD="
myConn = New SqlConnection(m ystring)
myCommand.Conne ction = myConn
myConn.Open()
myCommand.Comma ndText = "Select * from agegender"
myCommand.Execu teXmlReader()

when i execute the connection it says login failed for
'L20935-P3\ASPNET',but i am sure the password is right, i have
verified the password works

i then tried the other option

2)
mystring= "database=[SmartLan 2.0 ED];data source=localhos t;user
id=sa;password= ;"
..
..
..
when i execute the connection it says login failed for
'L20935-P3\ASPNET' for user sa

i dont know whats going on???
can anyone please help me !!!!!!!!!!!!
Nov 18 '05 #1
1 1264
Hi Lloyd,

It looks like you're mixing and matching portions of the connection string
in a way that doesn't work.

You're trying to use both integrated security and the userID/password
method.
"lloyd" <ll***********@ rediffmail.com> wrote in message
news:e7******** *************** ***@posting.goo gle.com...
i am trying to connect to my Sqlserver on my machine.
i tried using the following connection strings

1)

mystring= "Initial Catalog=[SmartLan 2.0 ED];Data
Source=localhos t;Integrated Security=SSPI;U ID='sa';PWD="
myConn = New SqlConnection(m ystring)
myCommand.Conne ction = myConn
myConn.Open()
myCommand.Comma ndText = "Select * from agegender"
myCommand.Execu teXmlReader()

when i execute the connection it says login failed for
'L20935-P3\ASPNET',but i am sure the password is right, i have
verified the password works

i then tried the other option

2)
mystring= "database=[SmartLan 2.0 ED];data source=localhos t;user
id=sa;password= ;"
.
.
.
when i execute the connection it says login failed for
'L20935-P3\ASPNET' for user sa

i dont know whats going on???
can anyone please help me !!!!!!!!!!!!


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5479
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
12
1483
by: Bill | last post by:
When I compile the following code fragment, the compiler errors saying the variable connection is not initialized. As I understand C#, I thought it would be initialized. Please help me and explain what I am missing Bil static void Main(string args SqlConnection connection try // to open the connection to the database connection=new SqlConnection((string)( System.Configuration.ConfigurationSettings.AppSettings))
15
2099
by: DavidS | last post by:
Have Visual Studio.NET installed on MS 2000 Professional OS laptop. No issue ever with web development and SQL connections. Purchased new laptop with XP Professional SP2!!!!!!!! & Visual Studio.NET installed. Nothing but headaches. Continually getting System.Data.SqlClient.SqlException : Timeout expired message - The timeout period elapsed prior to completion of the operation or the server is not responding. Can anyone help with...
4
1176
by: Kimon Ifantidis | last post by:
Vey simple, but does not work: I'm trying to set a data-driven Web page with a GridView control. The steps I followed are: 1. Created a data connection using Database Explorer. 2. Dropped an SqlDataSource and a GridView control on the page. 3. Set the data source (configured by using the data connection) and selected the this data source for the GridView. 4. Specified the columns of a table for the GridView.
8
9637
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query work from
7
9714
by: Siv | last post by:
Hi, I have a stored procedure that I want to execute and then wait in a loop showing a timer whilst it completes and then carry on once I get notification that it has completed. The main reason for this being to stop the user thinking the application has frozen when in fact it is just waiting for a long SP to complete. Another reason for doing it like this is that I also have had a problem in the past where the SP takes longer than the...
14
7042
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that sql server resides on is not reachable. The error is different depending on the connection string that I use. If I use the following connection string: "server=192.1.1.1; Initial Catalog=master; uid=The_User; password=The_Password; Connect...
0
5573
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
4
2215
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I wanted to move my work and needed to place it on the server. Using VS 2005 , went to BUILD -Publish Web Site Checked the box for :: Alow this precompiled site to be updatable.
1
7112
by: =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post by:
I get the above error in some of the ASP.NET web applications on a server, and I need some help figuring out how to deal with it. This is a rather long post, and I hope I have enough details that someone who bothers to read all of it have some pointers. Note, I have posted the stack trace and the code exhibiting the problem further down so if you want to start by reading that, search for +++ Also note that I am unable to reproduce...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.