Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts

Thursday, March 22, 2012

ASP and MSDE Connection Problems

Hello
I have a simple MSDE database set up on this local machine. I have a small
asp.net web page that tries to query the database and returns a list from
one of the columns. Nothing fancy, just trying to set it all up and get it
all working.
I get an error on the page when I run it.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'BBAISLEY\ASPNET'.
I assume this means that the user account isn't set up right, but I am not
telling it to use this account. I have the following connection string:
Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
trusted_connection=true; database='music_cds'; user id=SQL;
password=xxxxxxxxxx;"
Can someone help me get this working? I would like to make a simple account
for all of my apps to use, don't really care what its called for now.
When I log in, I can only use the windows authencation method, so maybe my
MSDE instance isn't set for SQL passwords? How can I check this?
Thanks
Brett
You are using ASP.NET?
This is a common error as the applications default to using the ASPNET
account.
You have two choices:
1. Give access to the ASPNET account. (I dont think you want to do this
though).
2. Modify the AUTHENTICATION heading in the web.config file, & also the
virtual directory/site/directory property to only allow windows
authenticated users into the folder:
Under the AUTHENTICATION heading add:
<identity impersonate="true" />
Modify IIS to only allow windows authenticated users through...
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Whoops, I misread!
It looks like you do want to use the first suggestion I made.
By default, msde is only setup for Windows Authentication, rather than sql
authentication.
See this link for information on how to modify this:
http://support.microsoft.com/default...en-us%3B319930
http://support.microsoft.com/default...n-us%3BQ322336
Cheers,
James Goodman
"Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Hello
> I have a simple MSDE database set up on this local machine. I have a small
> asp.net web page that tries to query the database and returns a list from
> one of the columns. Nothing fancy, just trying to set it all up and get it
> all working.
> I get an error on the page when I run it.
> Exception Details: System.Data.SqlClient.SqlException: Login failed for
> user 'BBAISLEY\ASPNET'.
> I assume this means that the user account isn't set up right, but I am not
> telling it to use this account. I have the following connection string:
> Dim connectionString As String = "server='BBAISLEY\MSDEBBAISLEY';
> trusted_connection=true; database='music_cds'; user id=SQL;
> password=xxxxxxxxxx;"
> Can someone help me get this working? I would like to make a simple
account
> for all of my apps to use, don't really care what its called for now.
> When I log in, I can only use the windows authencation method, so maybe my
> MSDE instance isn't set for SQL passwords? How can I check this?
> Thanks
> Brett
>
|||Ahh, that fixed it up. Thanks James
"James" <jamesATnorton-associates.co.ukREMOVE> wrote in message
news:e6GypgfLEHA.1644@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Whoops, I misread!
> It looks like you do want to use the first suggestion I made.
> By default, msde is only setup for Windows Authentication, rather than sql
> authentication.
> See this link for information on how to modify this:
> http://support.microsoft.com/default...en-us%3B319930
> http://support.microsoft.com/default...n-us%3BQ322336
>
> --
> Cheers,
> James Goodman
> "Brett Baisley" <baisley@.hotmail.com.REMOVETHIS> wrote in message
> news:e$TLLgdLEHA.3292@.TK2MSFTNGP11.phx.gbl...
small[vbcol=seagreen]
from[vbcol=seagreen]
it[vbcol=seagreen]
not[vbcol=seagreen]
> account
my
>

Sunday, March 11, 2012

AS2005. Aggregate - Last Argument = Bug?

Hi,

some people say that the function aggregate() perfoms quicker without last argument. It's right.
But witout last argument it can returns wrong result. It is nasty :-(

For example

WITH
member [Date].[Calendar].[Column 0] as AGGREGATE({
[Date].[Calendar].[Month].&[2004]&[1],
[Date].[Calendar].[Month].&[2004]&[2],
[Date].[Calendar].[Month].&[2004]&[3],
[Date].[Calendar].[Month].&[2004]&[4],
[Date].[Calendar].[Month].&[2004]&[5],
[Date].[Calendar].[Month].&[2004]&Devil,
[Date].[Calendar].[Month].&[2004]&[7],
[Date].[Calendar].[Month].&[2004]&Music}
)
--, Measures.CurrentMember)

SET [RowSet0] AS {[Customer].[Customer].[All Customers].children}
SET [RowSet1] AS topcount([RowSet0],100,([Date].[Calendar].[Column 0],[Measures].[Internet Sales Amount]))
SET [TotalSet] AS [RowSet1]

SELECT {[Date].[Calendar].[Column 0]} ON COLUMNS,
CROSSJOIN({[Customer].[Customer].[All Customers],[RowSet1]},{[Measures].[Internet Sales Amount], [Measures].[Internet Order Count]})
ON ROWS
FROM [Adventure Works]

I wonder... is this the same problem as I describe here:
http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!889.entry
? Looks very much like it. In which case it's a feature and not a bug, but I agree, it's a pretty confusing one and something that does need to be changed.

Chris

Friday, February 24, 2012

Array of CatalogItem[] Objects Returned from ListChildren

In the RS help documentation, the ListChildren method notes, "If no children
exist, this method returns an empty CatalogItem object."
So, I'm wondering how can I detect if no items were returned from my
ListChildren call.
I though something like this:
Reports.ReportingServices.CatalogItem[] items = null;
items = rs.ListChildren("/MasterReports", true);
if (items != null)
{
// not empty
}
else
{
// no children, empty catalog
}
Will this work? Again the documentation says it'll return an "empty"
catalog object, not necessarily a "null" object.
Thanks.Actually, just use:
if (items.length > 0)
process items...
else
no children...
end if
=-Chris
"dvorak" <dvorak@.nospam.com> wrote in message
news:%23zbBBIgGFHA.3472@.TK2MSFTNGP09.phx.gbl...
> In the RS help documentation, the ListChildren method notes, "If no
> children
> exist, this method returns an empty CatalogItem object."
> So, I'm wondering how can I detect if no items were returned from my
> ListChildren call.
> I though something like this:
>
> Reports.ReportingServices.CatalogItem[] items = null;
> items = rs.ListChildren("/MasterReports", true);
> if (items != null)
> {
> // not empty
> }
> else
> {
> // no children, empty catalog
> }
>
> Will this work? Again the documentation says it'll return an "empty"
> catalog object, not necessarily a "null" object.
> Thanks.
>