Re: What's My Password?
- From: "Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx>
- Date: Mon, 8 Jan 2007 13:26:17 -0700
William,
When you install any version of Visual Studio (even the Express SKU), it
installs SQL Server Express Edition (quietly). There's no reason you
should have known that.
Yes, thank you!
To determine if you have SQL Server Express installed, use the Server
Explorer in Visual Studio and click on Servers | YourSystem | Services and
scroll down to see if "SQL Server (SQLEXPRESS)" is listed. If it's there,
you have an instance of SQL Server (named "SQLEXPRESS") installed and
(possibly) running on your system. This assumes you aren't running the
Express SKU of Visual Studio as this exposes a "database" explorer instead
with far more limited functionality.
Yes, there is an entry named "SQL Server (SQLEXPRESS)".
Suddenly, I feel I'm actually moving forward. However, there are two issues
in my mind. 1) It appears I have SQL Server Express, but I'm not as sure
that's the version I want to use. And 2) I will eventually move this to my
Web server (currently hosted by GoDaddy.com) and assume I will need to use
whatever they have.
When connecting to any instance of SQL Server, you have to establish who
you are and which database on the server (it can support virtually any
number of databases) you want to use. You identify yourself with username
and password credentials. These can either be supplied by Windows
authentication (as when you logged on to your system or on to a domain) or
by SQL Server authentication. By default, only Windows authentication is
enabled (on all SKUs of SQL Server). This means that SQL Server must have
a Login account setup to permit access to the server. By default, SQL
Server permits members of the Administrators group to be granted access to
the server. If you don't have a Username and Password in your
ConnectionString, you must have "Trusted Connection=Yes" or "Integrated
Security=SSPI" to indicate that SQL Server is to use the current user's
Windows authentication credentials. However, when creating an application,
you can't assume that the end-user will have those rights.
To reiterate, this is a Web site I'm developing (although I do plan to
develop some desktop applications in the future that will use a database).
Here are the connection strings I've tried to far:
1. "Data Source=localhost;Initial Catalog=BlackBeltCoder;Integrated
Security=True"
2. "Data Source=localhost;Initial Catalog=BlackBeltCoder;Integrated
Security=SSPI"
3. "Data Source=localhost;Initial Catalog=BlackBeltCoder;user
id=sa;password=opensesame"
In all cases, the following code fails:
SqlConnection conn = new SqlConnection(connString);
conn.Open();
I just get a message about not being configured for remote connections,
which I don't understand since (at least, so far) it would seem to be a
local connection.
I discuss how to configure the server and all of this in far more detail
in my latest book--See Chapter 9.
Well, perhaps I should look out for that then.
Thanks.
--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
.
- Follow-Ups:
- Re: What's My Password?
- From: William \(Bill\) Vaughn
- Re: What's My Password?
- References:
- What's My Password?
- From: Jonathan Wood
- Re: What's My Password?
- From: William \(Bill\) Vaughn
- Re: What's My Password?
- From: Jonathan Wood
- Re: What's My Password?
- From: William \(Bill\) Vaughn
- What's My Password?
- Prev by Date: Re: What's My Password?
- Next by Date: Re: What's My Password?
- Previous by thread: Re: What's My Password?
- Next by thread: Re: What's My Password?
- Index(es):
Relevant Pages
|
Loading