Showing posts with label upon. Show all posts
Showing posts with label upon. Show all posts

Wednesday, March 28, 2012

Please help ??

I have installed SQL Server 2005 Express on Windows XP Pro with SP2.

I have also installed ASP.NET Web Matrix on same machine. Upon selecting the Data tab (next to the Workspace tab), I click on the Database Connection button. I am asked if I want to connect to an Access db or a SQL Server db. I select the SQL Server db and I then receive a dialog box that asks me the Server Name: the default is (local) and I have used that as well as localhost. I use SQL Server authentication and enter a username of sa and a password that I set up during the installation process. I finally select the Create a New Database link and I then get the message SQL Server does not exist or access denied.

I have checked that my services are running. I also have uninstalled and reinstalled both SQL Server Express 2005 and ASP.NET Web Matrix but still the same glitch.

Any help would be greatly appreciated...

Glenn

Hello All,

I have solved my problem. The server name was my issue. I had list (local), localhost and my machine name, none of which worked. I then added my machine name\sqlexpress and it worked.

GO FIGURE ...

sql

Monday, March 12, 2012

Placing Comments In Views

Is it possible to add comment lines to views? I tried using -- and /* . . .
but these lines were removed upon save. I tried using the property window,
but that cleared out my query.
Yes, make sure you have the comment inside the CREATE VIEW, such as
CREATE VIEW v
AS
--MyComment
SELECT 1 AS a
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> Is it possible to add comment lines to views? I tried using -- and /* . . .
> but these lines were removed upon save. I tried using the property window,
> but that cleared out my query.
|||I did what you suggested, but it still didn't do what I expected. So, I used
a query as simple as yours . . . and it did do what I expected. Could it be
that the comments in the property window don't work on views with UNION
queries?
Just to be clear: If I access the property window within DESIGN mode, the
comments do not appear. But if I access the property box from the list of
all views window, I do see my comment after the CREATE VIEW statement.
"Tibor Karaszi" wrote:

> Yes, make sure you have the comment inside the CREATE VIEW, such as
> CREATE VIEW v
> AS
> --MyComment
> SELECT 1 AS a
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
>
|||Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
CREATE VIEW v2
AS
--MyComment
SELECT 1 AS a
UNION ALL
SELECT 1 AS a
And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
from Query analyzer...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...[vbcol=seagreen]
>I did what you suggested, but it still didn't do what I expected. So, I used
> a query as simple as yours . . . and it did do what I expected. Could it be
> that the comments in the property window don't work on views with UNION
> queries?
> Just to be clear: If I access the property window within DESIGN mode, the
> comments do not appear. But if I access the property box from the list of
> all views window, I do see my comment after the CREATE VIEW statement.
> "Tibor Karaszi" wrote:
|||Just one more note: if I add the comments via script, but then make a change
via EM and/or Visual Studio - saving the changes loses the comment lines.
But thanks, I got what I need . . . I'll just make sure the comments are in
the scripts we deliver to our customers.
"Tibor Karaszi" wrote:

> Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
> CREATE VIEW v2
> AS
> --MyComment
> SELECT 1 AS a
> UNION ALL
> SELECT 1 AS a
> And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
> with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
> comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
> from Query analyzer...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
>

Placing Comments In Views

Is it possible to add comment lines to views? I tried using -- and /* . . .
but these lines were removed upon save. I tried using the property window,
but that cleared out my query.Yes, make sure you have the comment inside the CREATE VIEW, such as
CREATE VIEW v
AS
--MyComment
SELECT 1 AS a
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> Is it possible to add comment lines to views? I tried using -- and /* . . .
> but these lines were removed upon save. I tried using the property window,
> but that cleared out my query.|||I did what you suggested, but it still didn't do what I expected. So, I used
a query as simple as yours . . . and it did do what I expected. Could it be
that the comments in the property window don't work on views with UNION
queries?
Just to be clear: If I access the property window within DESIGN mode, the
comments do not appear. But if I access the property box from the list of
all views window, I do see my comment after the CREATE VIEW statement.
"Tibor Karaszi" wrote:
> Yes, make sure you have the comment inside the CREATE VIEW, such as
> CREATE VIEW v
> AS
> --MyComment
> SELECT 1 AS a
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> > Is it possible to add comment lines to views? I tried using -- and /* . . .
> > but these lines were removed upon save. I tried using the property window,
> > but that cleared out my query.
>|||Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
CREATE VIEW v2
AS
--MyComment
SELECT 1 AS a
UNION ALL
SELECT 1 AS a
And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
from Query analyzer...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
>I did what you suggested, but it still didn't do what I expected. So, I used
> a query as simple as yours . . . and it did do what I expected. Could it be
> that the comments in the property window don't work on views with UNION
> queries?
> Just to be clear: If I access the property window within DESIGN mode, the
> comments do not appear. But if I access the property box from the list of
> all views window, I do see my comment after the CREATE VIEW statement.
> "Tibor Karaszi" wrote:
>> Yes, make sure you have the comment inside the CREATE VIEW, such as
>> CREATE VIEW v
>> AS
>> --MyComment
>> SELECT 1 AS a
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Jim" <Jim@.discussions.microsoft.com> wrote in message
>> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
>> > Is it possible to add comment lines to views? I tried using -- and /* . . .
>> > but these lines were removed upon save. I tried using the property window,
>> > but that cleared out my query.
>>|||Just one more note: if I add the comments via script, but then make a change
via EM and/or Visual Studio - saving the changes loses the comment lines.
But thanks, I got what I need . . . I'll just make sure the comments are in
the scripts we deliver to our customers.
"Tibor Karaszi" wrote:
> Probably some GUI problem with Enterprise Manager. I did a simple test with below view:
> CREATE VIEW v2
> AS
> --MyComment
> SELECT 1 AS a
> UNION ALL
> SELECT 1 AS a
> And the comment does not show, as you say. I don't use EM for view design myself. My guess is that
> with a more complex query, the parsing that EM does of the view isn't smart enough to extract the
> comment. I guess you could call it a bug and open a case with MS for it. I prefer writing the views
> from Query analyzer...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
> >I did what you suggested, but it still didn't do what I expected. So, I used
> > a query as simple as yours . . . and it did do what I expected. Could it be
> > that the comments in the property window don't work on views with UNION
> > queries?
> >
> > Just to be clear: If I access the property window within DESIGN mode, the
> > comments do not appear. But if I access the property box from the list of
> > all views window, I do see my comment after the CREATE VIEW statement.
> >
> > "Tibor Karaszi" wrote:
> >
> >> Yes, make sure you have the comment inside the CREATE VIEW, such as
> >>
> >> CREATE VIEW v
> >> AS
> >> --MyComment
> >> SELECT 1 AS a
> >>
> >>
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >> Blog: http://solidqualitylearning.com/blogs/tibor/
> >>
> >>
> >> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> >> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> >> > Is it possible to add comment lines to views? I tried using -- and /* . . .
> >> > but these lines were removed upon save. I tried using the property window,
> >> > but that cleared out my query.
> >>
> >>
>

Placing Comments In Views

Is it possible to add comment lines to views? I tried using -- and /* . . .
but these lines were removed upon save. I tried using the property window,
but that cleared out my query.Yes, make sure you have the comment inside the CREATE VIEW, such as
CREATE VIEW v
AS
--MyComment
SELECT 1 AS a
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
> Is it possible to add comment lines to views? I tried using -- and /* . .
.
> but these lines were removed upon save. I tried using the property window
,
> but that cleared out my query.|||I did what you suggested, but it still didn't do what I expected. So, I use
d
a query as simple as yours . . . and it did do what I expected. Could it be
that the comments in the property window don't work on views with UNION
queries?
Just to be clear: If I access the property window within DESIGN mode, the
comments do not appear. But if I access the property box from the list of
all views window, I do see my comment after the CREATE VIEW statement.
"Tibor Karaszi" wrote:

> Yes, make sure you have the comment inside the CREATE VIEW, such as
> CREATE VIEW v
> AS
> --MyComment
> SELECT 1 AS a
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:53FCF340-8E7A-495C-BD84-0C8A7882B001@.microsoft.com...
>|||Probably some GUI problem with Enterprise Manager. I did a simple test with
below view:
CREATE VIEW v2
AS
--MyComment
SELECT 1 AS a
UNION ALL
SELECT 1 AS a
And the comment does not show, as you say. I don't use EM for view design my
self. My guess is that
with a more complex query, the parsing that EM does of the view isn't smart
enough to extract the
comment. I guess you could call it a bug and open a case with MS for it. I p
refer writing the views
from Query analyzer...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...[vbcol=seagreen]
>I did what you suggested, but it still didn't do what I expected. So, I us
ed
> a query as simple as yours . . . and it did do what I expected. Could it
be
> that the comments in the property window don't work on views with UNION
> queries?
> Just to be clear: If I access the property window within DESIGN mode, the
> comments do not appear. But if I access the property box from the list of
> all views window, I do see my comment after the CREATE VIEW statement.
> "Tibor Karaszi" wrote:
>|||Just one more note: if I add the comments via script, but then make a change
via EM and/or Visual Studio - saving the changes loses the comment lines.
But thanks, I got what I need . . . I'll just make sure the comments are in
the scripts we deliver to our customers.
"Tibor Karaszi" wrote:

> Probably some GUI problem with Enterprise Manager. I did a simple test wit
h below view:
> CREATE VIEW v2
> AS
> --MyComment
> SELECT 1 AS a
> UNION ALL
> SELECT 1 AS a
> And the comment does not show, as you say. I don't use EM for view design
myself. My guess is that
> with a more complex query, the parsing that EM does of the view isn't smar
t enough to extract the
> comment. I guess you could call it a bug and open a case with MS for it. I
prefer writing the views
> from Query analyzer...
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:04C89683-D9BF-482A-AFBF-7915F0621F85@.microsoft.com...
>