Showing posts with label typical. Show all posts
Showing posts with label typical. Show all posts

Sunday, February 26, 2012

Error with databound datagrid

Help,

I have a simple app that only has on datagrid that is bound by the typical sqlconnection,sqldataadapter and dataset. But I keep getting this error:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

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: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Source Error:

Line 55: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadLine 56: 'Put user code to initialize the page hereLine 57: SqlDataAdapter1.Fill(DataSet11)Line 58: DataGrid1.DataBind()Line 59:

WHY :)

xactly what the message says..can you post the connection string ?

|||
Indeed, fix your connectionstring. Get that working before messing withdatagrids. The error indicates that you're telling ADO.NET to use atrusted connection (i.e. windows authentication) but the ASPNET useraccount probably doesn't have access to your database. I typically useSQL authentication so I can limit the damage each application can do.One account per database.

Wednesday, February 15, 2012

Error While Exporting Data From a report which have SubReport. - D

Hi all,
i am facing a typical problem in SSRS.I have a report which have a
subreport.Everything working fine if i have data on my main report and my sub
report also,but if i don't have any data then report is giving a error when i
am trying to EXPORT it in some version(.xls or .xml etc).
Really i could not able to understand the reason behind this problem.
I am looking fwd for your quick reply rgd the same.
Thanks in advance.
DibakarOn Feb 26, 4:54 am, Dibakar <Diba...@.discussions.microsoft.com> wrote:
> Hi all,
> i am facing a typical problem in SSRS.I have a report which have a
> subreport.Everything working fine if i have data on my main report and my sub
> report also,but if i don't have any data then report is giving a error when i
> am trying to EXPORT it in some version(.xls or .xml etc).
> Really i could not able to understand the reason behind this problem.
> I am looking fwd for your quick reply rgd the same.
> Thanks in advance.
> Dibakar
I have come across this issue when I have not had data on my subreport
before. Have you tried returning an empty row to the main report (from
the subreport) yet?
Enrique Martinez
Sr. SQL Server Developer|||Yes, i am doing it.but still the same problem remains.
I don;t know how to solve it?Pls help
"EMartinez" wrote:
> On Feb 26, 4:54 am, Dibakar <Diba...@.discussions.microsoft.com> wrote:
> > Hi all,
> >
> > i am facing a typical problem in SSRS.I have a report which have a
> > subreport.Everything working fine if i have data on my main report and my sub
> > report also,but if i don't have any data then report is giving a error when i
> > am trying to EXPORT it in some version(.xls or .xml etc).
> >
> > Really i could not able to understand the reason behind this problem.
> >
> > I am looking fwd for your quick reply rgd the same.
> >
> > Thanks in advance.
> >
> > Dibakar
>
> I have come across this issue when I have not had data on my subreport
> before. Have you tried returning an empty row to the main report (from
> the subreport) yet?
> Enrique Martinez
> Sr. SQL Server Developer
>