RsAccessDenied (RESOLVED)

Jul 12, 2007

Hi,

I have installed SSRS and created a .net application... now when I try to open the report viewer, I get the error " the permission granted to user 'domainuser' are insufficient for performing this operation. (rsAccessDenied)" I have searched the net hi and low and cant seem to find an adequate answer... something to do with roles or permissions? I have assigned permissions to this user on the ssrs database, yet I still cant seem to view the report. It works fine in my test environment (as it usually does ) any help on this would be greatly appreciated as to be honest, I dont really know what im doing here.

"Impossible is Nothing"

View 8 Replies


ADVERTISEMENT

RESOLVED RESOLVED An Attempt To Attach An Auto-named Database For File &&<file String&&> Failed &&>&&>&&> But ONLY After SSE Reinstall

Sep 16, 2007

RESOLVED RESOLVED RESOLVED

DOH! When I rebuilt the OS, I changed the data partition ID's, and didn't remember to change them in the connetion strings

Not great, but better than continuing to bang head against wall.

Would like to say to MS appreciators that the VS2005 reinstall actually went quite well, considering.

===========================================================================





I built an app, works fine. Had the development environment working fine (VS2005 (SP0) and SQL Server Express). It had been stable for months, no problem.


Then I had to reinstall XP Pro...(finally threw too many conflicting programs into it, I guess...)


I managed to get VS2005 reinstalled ok. However, when I opened and compiled my existing app in VS2005, using Cassini, I got the dreaded error:

An attempt to attach an auto-named database for file <file string> failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

I also get this error for the compiled copy of the app on the same machine, running on IIS. (Where it also previously worked fine).


The Connection strings are all of the form

connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=(specific file string).MDF;Integrated Security=True;User Instance=True"


I appreciate that there are zillions of posts on this issue. I'm hoping that someone might know why this should happen in this particular case.


The thing that's different about this case is that the app was working fine; I have the app deployed on a demo machine and also on a remote server as well as on the development machine.


The only thing that changed is that there was this fresh install of SQL Server Express.


I tried using >> sp_configure user instances enabled','1';RECONFIGURE <<< in SSMSEE, which took, but didn't help.


So something is different in SSE. Since the app is stable everywhere else, I REALLY don't want to go through and adjust the connection strings...MUCH better to figure out what SSE needs to be happy with the existing connection strings...as it was before.

Any suggestions would be appreciated.

Thanks!

EDIT----TRIED SOME THINGS:




Changed folder and file permissions to allow ASPNET full access to the .mdf's and log files (though never had to do this before on the development machine.) No change...

Can see the table contents within the .mdf through SSMSE, and also through Server Explorer in VS2005.

So because the problem happens with both IIS and Cassini, I'm assuming it's got to be an issue between ASPNET and SSE.

EDIT --- TRIED SOME MORE THINGS:

I dimly remember that when I had this problem before, it was that the error message was too "dumb". It wasn't my file that had the permissions problems, it was that the SSE System Databases had to have permissions with respect to ASPNET.

I tried to set that up but I'm a complete newb on this area, so I don't know if I did it right. In SSMSE I created a Login for MyComputer/ASPNET, and gave it all permissions and roles, and then made it an owner for the four system databases...but no joy.

Any pointers on this last piece would be helpful.

EDIT - MORE INFO

The error details

[SqlException (0x80131904): An attempt to attach an auto-named database for file <filestring>.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1956
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +170
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181

View 1 Replies View Related

RsAccessDenied

Oct 10, 2007

Hi i am having this error when i am running my default1.aspx page in localhost.I am using sql server 2005 reporting services and i have made one report in business intelligence tools reporting service through wizard.And deploy it it is running in report server.I am using one page that is default1.aspx and using report viewer and set the path that is debugging and showing that report but when i am running that in url write http://localhost/testdemo/default1.aspx so it is giving error
that error is"The Permission Granted to user "UserName/ASPNET" is insufficient for performing this operation.(rsAccess Denied)
Please help me to solve this problem.

View 1 Replies View Related

RsAccessDenied

Feb 22, 2006

I have a reportViewer control on a webform. In my partial class I set the report path, server and parameters in the Page_Load. When I run the report I get this error:


The permissions granted to user 'NT AUTHORITYNETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied)

Here is my code:

Dim u As New UriTypeConverter
Dim ReportParameters(0) As ReportParameter


ReportParameters(0) = New ReportParameter("ProjectKey", 262)
rv.ShowParameterPrompts = False
rv.ServerReport.ReportServerUrl = u.ConvertFromString("http://localhost/ReportServer/")
rv.ServerReport.ReportPath = "/Test/Duplicate_MIU_Report"
rv.ServerReport.SetParameters(ReportParameters)

View 27 Replies View Related

RsAccessDenied

Sep 17, 2007

The permissions granted to user '[user]' are insufficient for performing this operation. (rsAccessDenied) Get Online Help


I have given role (literally every possible role just to see) access in SQL Manager without success. And the permissions on the directory were set to Everyone Full Control (just to try to get it to work).

Any ideas?

View 6 Replies View Related

RsAccessDenied

Nov 6, 2006

Hello,

I am new to Reporting Services 2005, so please bare with me. I have set up a new report that runs fine when I run it, but I am the administrator on the server. When I have a user go to the same web page and attempt to run the report, they receive an error that says something along the lines of "User account 'DomainNameUserName' does not have sufficient access to ReportServer... rsAccessDenied." I have seen several threads on the web that point to IIS, and some that point to the "Reporting Services Configuration Manager" under "Windows Service Identity". In my Windows Services Identity, I have the server set up as "Built-in Account = 'Local System'". Everything seems to be running perfect for me, I just can€™t seem to get non-admin accounts to run reports from there local workstations. Please let me know what my settings should be on the server. Like I said, the web page comes up fine for all users, but when they click on the hyperlink that runs the report, they receive the Reporting Services error message, but it runs fine for me. Your help would be greatly appreciated.

Thanks,

Stephen Rooker

View 5 Replies View Related

Error RsAccessDenied

Aug 22, 2006

When I try to deploy one of my Reports I receive the following error :

Deploying to http://localhost/ReportServer

Error rsAccessDenied : The permissions granted to user 'BOGDANIUSR_BOGDAN' are insufficient for performing this operation.

 

That is because I configured IIS for those 2 folders ReportServer and Reports to accept anonymous . If I turn anonymous off and let windows authentification on he lets me to deploy the project , but I can see anymore http://localhost/Reports and http://localhost/ReportServer because he asks for password and I don't have any password set for the computer , nor for SQL Server . I just use Windows Authentification for all.

 I searched through this forum but nothing is significant related to my problem

What is wrong here ?

Thanks

edit: I also changed in Reporting Server configuration , Windows Service Identity to Network service and implicit the account to : NT AuthorityNetworkService .

If I allow anonymous access from IIS to the Reports folder , then he loads but he shows me only the title and Home , Subscription links from de top right corner , nothing else ( no Properties tab , no nothing ) . Anyway there must be another way then selecting anonymous user , because the default was not selected .

View 8 Replies View Related

RSAccessDenied When Using Execution Account

Mar 19, 2008

We have a client-server product making use of SSRS. We have done dozens of installs, all with no issues, until this one. We have created an NT account specifically to run our reports. We'll call it "ReportUser". We have made it a local account on the server with the appropriate access to run reports. We set it up as the execution account and gave it the necessary permissions on the SQL Server. When we log onto http://localhost/reportserver on the server, we can access and run reports just fine. However, when we run it from a client through http://<servername>/reportserver, we receive the RSAccessDenied error. However, it does not list the execution account (i.e. <servername>ReportUser) as the prolem, but instead the given user's username (i.e. <domain><username>).

As a side note, we also cannot access the Report Manager from anywhere. We log onto it from the server even, and it only shows the Top portion of the screen. No published reports, no menu options, nothing.

Can anyone provide some insight?

View 8 Replies View Related

Can't Pass Parameter - RsAccessDenied

Feb 24, 2006

I am having a problem passing a parameter. When it gets to the last line of code where I set the parameters, I get this error. Can anyone help?


The permissions granted to user 'NT AUTHORITYNETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied)



Here is my code:


ReportParameters(0) = New ReportParameter("ProjectKey", 262)
rv.ShowParameterPrompts = False
rv.ServerReport.ReportServerUrl = u.ConvertFromString("http://localhost/ReportServer/")
rv.ServerReport.ReportPath = "/Test/Duplicate_MIU_Report"
rv.ServerReport.SetParameters(ReportParameters)

View 7 Replies View Related

Permissions Problem - RsAccessDenied - Urgent

May 4, 2006

Hi

I'm trying to get the CustomSecurity sample in Reporting Services to work [C:Program FilesMicrosoft SQL Server90SamplesReporting ServicesExtension SamplesFormsAuthentication SamplecsFormsAuthentication] but I keep on getting the following message:

The permissions granted to user 'Admin' are insufficient for performing this operation. (rsAccessDenied)

I have given <servername>ASPNET execute permissions.
I have successfully created a new user "Admin".

However, when I then try to logon to either ReportServer [http://miles/ReportServer/logon.aspx] or ReportManager [http://miles/Reports/pages/uilogon.aspx] I get the above error.

I'm using SQL 2005 Developer edition and XP professional.

Please help!

View 5 Replies View Related

Sql Server 2005 Reporting Service(rsAccessDenied)

Oct 10, 2007

"http://localhost/MyTrail/Default2.aspx" when i am running this so i will give me error that is"The Permission granted to user"UserName/ASPNET" is insufficient for performing this operation.(rsAccessDenied)
Please help me to solve this problem...
I did settiings on Report manager.
1- Set the role as a Browser.
2-In IIS anonymous settings
 
Please help me to solve this problem

View 1 Replies View Related

Error (rsAccessDenied) - 'NT AUTHORITYNETWORK SERVICE' Are Insufficient

Feb 24, 2006

I have created a report using Microsoft Sql Server 2005 Reporting in my ASP.NET 2.0 Web application. It is succesfully running on the server itself on which I have created. But when I am trying to access it from my client machine by typing URL in the IE6 it gives me following error.

"The permissions granted to user 'NT AUTHORITYNETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied) "

Dont know how to solve this problem.

View 24 Replies View Related

Report Builder (rsaccessdenied) Error Message

Aug 9, 2007

Hi,

I have created a Report Model and published it on our QA environment Report Server(Where I dont have admin access). When I try to launch the Report Builder tool and create a sample report and Run the report it gives me this error. "The permissions granted to user 'Domainname/user group' are insufficient for performing this operation. (rsAccessDenied)" I checked with the Admins on this server the usergroup has a "Browser" Role. I had read on some online fourm that if user group has browser role it should work. But I cant get it work any help is appreciated.

I have published the same Report Model in Deveploment environment report server(where I have admin access) and when I do the same thing I am able to run the reports.

Some one please help me its causing delay in our testing.

Thanks
Ashwini

View 14 Replies View Related

Error RsAccessDenied : The Permissions Granted To User '' Are Insufficient For Performing This Operation.

Mar 20, 2007

I get an error message when deploying reports to the reportserver from microsoft visual studio.

error message : Error rsAccessDenied : The permissions granted to user '' are insufficient for performing this operation.

TargetServerURL : http://server.com/ReportServer$sql_2005

The Report server is configured to use a custom security extension. i can access the reportserver.

It looks like when i deploy the reports from VS. it does not pass any credentials to the report server. From the error message it looks like there is no username . How do i deploy reports to report server if we are using a custom security extension. How do i grant user rights to deploy report if we are using a custom security extension. Any idea. Thanks!



chi



View 4 Replies View Related

The Permissions Granted To User 'domainusername' Are Insufficient For Performing This Operation. (rsAccessDenied)

Jan 21, 2008



Hi,

I wonder if anyone can help me?

I have installed and configured sql server 2005 express edition with advanced services on an xp box, with the aim of using reporting services.

I have set up reporting services successfully using the report manager, with my web services id = netwrokservice.

I can access both the report manager and report url locally, i.e while using localhost anjd on the machine. The problem arises however when i try to access

the reports from another machine, as i get the message:

"The permissions granted to user 'domainusername' are insufficient for performing this operation. (rsAccessDenied)"

when going to for example:

"http://servername/ReportServer/Pages/ReportViewer.aspx?%2fReport1&rs:Command=Render"

I have looked at various sites (including microsoft) in an attempt to find a solution to this and most sites give exmaples of how to configure the full

version of reporting services which i do not have. The things that I have managed to gleam and try are:

- open up security on dir: C:Program FilesMicrosoft SQL ServerMSSQL.2Reporting ServicesReportServer to everyone and allow all access
- added my own username as a new role assigment in the report manager page
- added my own username to the reportserveruser and reportingserviceswebservicesuser roles, as indicated by microft:

http://msdn2.microsoft.com/en-us/library/ms365166.aspx, who state that "Custom authentication extensions and custom role assignments are not supported. You

must map existing Windows domain user and group accounts to predefined role definitions."

Can anyone suggest where to look next as I cannot believe that this should be this difficult?

Many Thanks in advance

View 3 Replies View Related

The Permissions Granted To User 'Domainuser' Are Insufficient For Performing This Operation. (rsAccessDenied)

Apr 25, 2008

Hi, I've scoured the forums and tried just about every answer to this problem without any success. What I have is SQL Server 2005 installed on a single machine, and trying to deploy reports to the same machine for testing purposes. When I try to deploy the report I receive the permissions error. Here's what I've gotten to at this point:


I can get to the reports URL (http://machine/Reports)

I can login to Reporting Services via SQL Server Management Studio as the administrator. (Windows Authentication)

I have added my login to the Home Folder-->Permissions in SQL Server Management Studio, and all reports are set to inherit the home folder's permissions

In Reporting Service Configuration Manager the Windows Service Identity is set to Local System, and for web service identity - ASP.NET Service Account is set to NT AuthorityNetworkService; Report Server and Report Manager are set to DefaultAppPool.

In IIS I tried enabling Anonymous Authentication

Current Application pools are set to "Classic" for Managed Pipeline mode (I did this to actually be able to login to Reporting Services via SQL Server management studio; having this set to integrated gives me an error)
What gets me is that this is entirely self-contained on one machine, that I set up as an administrator. So why do I get a permissions error when I am the admin on this machine deploying to this machine?

View 17 Replies View Related

The Permissions Granted To User 'DomainUser' Are Insufficient For Performing This Operation. (rsAccessDenied)

Apr 15, 2008

i finally got SSRS(SQL Server Reporting Services) to install properly and and it was working before i had to restart my PC
after restarting my PC i went back to the Domain/Reports$SQLExpress and the menus where Blank it just showed the help link and the border. so i opened the Domain/ReportServer$SQLExpress and it said


The permissions granted to user 'DOMAINOwner' are insufficient for performing this operation.(rsAccessDenied) Get Online Help
and there is no Login Box Popping up How do i get it to Login - Its set to use Windows Authentication what sould i doo please help ive had one problem after another with this SSRS

View 2 Replies View Related

Sp Won't Work, SQL Does ????? RESOLVED

Oct 4, 2005

I am using a function to fill a listbox in asp.net If I run it using the sql statement in the code, it works. if I use the sp I get an error saying the sp expects @strBookingNo which wasn't supplied. I have stepped through the function and there is a value in txNewBookingNo.text. Here's my function - the part commented out is the part that works,but I'd rather do it through an sp. I've included my sp too

Function GetFacilitiesBookings()

Dim MySQL As String = "spRB_GetFacilitiesBookings"
Dim MyConn As New SqlConnection(strConn)
Dim Cmd As New SqlCommand(MySQL, MyConn)
Cmd.CommandType = CommandType.StoredProcedure
Cmd.Parameters.Add(New SqlParameter("@strBookingNo", CInt(Me.txtNewBookingNo.Text)))
Dim myDataAdapter As SqlDataAdapter = New SqlDataAdapter(MySQL, strConn)
Dim ddlDataSet As New DataSet

myDataAdapter.Fill(ddlDataSet, "tblRB_FacilitiesBookings")

Return ddlDataSet

'Dim strSQL As String

'strSQL = "Select * from tblRB_FacilitiesBookings where FB_BookingNo = " & CInt(Me.txtNewBookingNo.Text) & " and FB_Cancelled =0"
'Dim myDataAdapter As SqlDataAdapter = New SqlDataAdapter(strSQL, strConn)
'Dim ddlDataset As New DataSet
'ddlDataset.Clear()

'myDataAdapter.Fill(ddlDataset, "tblRB_FacilitiesBookings")
'Return ddlDataset

End Function

CREATE Procedure [spRB_GetFacilitiesBookings]

@intBookingNo integer

as

Select * from tblRB_FacilitiesBookings where
FB_BookingNo = @strBookingNo and
FB_Cancelled = 0
GO

View 14 Replies View Related

SQL Syntax RESOLVED

Dec 13, 2005

Can anyone point me to a site which explains SQL syntax. ie I want to put brackets around a variable which holds a string of values for an IN clause.

Dim mySQLstr As String = "SELECT * from vweAvailableRooms where BD_RoomRef IN '"(" & Me.Session("RoomRefLogin") & ")"'"

View 2 Replies View Related

Using MAX(Mydate) In Sp RESOLVED

Jan 5, 2006

I have an sp which I should return the latest date in my sql table. Howver I am getting this error 'Implicit conversion from data type datetime to bigint is not allowed. Use the CONVERT function to run this query. ' Here's my sp and my code which calls the sp.

CREATE PROCEDURE spRB_MaxDate (
@MaxDate datetime OUTPUT
)
AS
SELECT @MaxDate =MAX(BD_DateRequired)
FROM tblRB_BookingDates

RETURN
GO

Here's how I call it

Dim MySQL1 As String = "spRB_MaxDate"
Dim myConn1 As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim Cmd1 As New SqlCommand(MySQL1, myConn1)
Cmd1.CommandType = CommandType.StoredProcedure

'Add the parameters


Dim outParm As SqlParameter = New SqlParameter("@MaxDate", 0)

outParm.Direction = ParameterDirection.Output
Cmd1.Parameters.Add(outParm)

myConn1.Open()
Cmd1.ExecuteNonQuery()
myConn1.Close()

'
' get value of new id
Dim MaxDate As DateTime = Cmd1.Parameters("@MaxDate").Value

View 2 Replies View Related

[ RESOLVED ] WHERE IN (Count Only Once)

Dec 10, 2007

I am selecting from two tables, with a one-to-many relationship.

Select t2.*
From Table1 t1
inner join Table2 on t1.id = t2.id
where t2.Field2 in (1,3)

There are times when there are 2 or more entries in table2 that relate to table1. I want to only display 1 of these entries, (either will do), I just dont want to display all.

View 3 Replies View Related

The Remote Name Could Not Be Resolved:

Apr 10, 2007



Hi we recently depoyed SSRS 2005 on two servers along with our web application.



the extranet setup

IIS Web server (app server) in DMZ linked to database server sat behind our corporate firewall. SSL installed on IIS server. SSRS app is on the IIS, with its db on the main database server behind corproate firewall.



we have a simple link going from our app to the reporting services link



however when we enter a login (incl admin) it fails with the message 'The remote name could not be resolved: "ourdomain.com"



windows authentication at the moment.



any help much appreciated.



thanks



View 3 Replies View Related

[Almost Resolved] SqlDataReader Vs. DataSets

Feb 1, 2008

Hi,
I am pretty new to harcore ASP.NET and .NET in general but I know the basics of the language and stuff like that. Basically I used to be a hardcore object pascal Delphi developer doing Windows Applications but have now moved to .NET world. The reason I posted this question here is I couldn't find any other specific place to ask so here it goes.
To get me started with good programming source and practices I downloaded the ASP.NET TimeTracker Starter Kit and after some modificaion in connection string (using SQL 2005 Developer edition not the Express one) I have managed to make it work. Things done in there are pretty interesting way by using a delegate to retrieve data and present it using databound controls.
As much simple as it sounds I am more of a fan of not using too many databound controls except in dropdown box, list box and stuff like that. So basically I need to develop DataAccessLayer (DAL) in such a way that it's useful for both Windows and Web application. So with my research I found that I should be using DataSets in the DAL because they are serializable and thatz what Web Applications & Services love over using SqlDataReader. Other advantage of using DataSet is to use ForEach syntex over While Loop in SqlDataReaders. So below is some code I extracted from the TimeTracker Starter Kit to get me started.
I also noticed that the return result is a list array of certain object, in this case Category. So does it mean that it can be used in frontend using ForEach syntex? How can I convert the code below to use DataSets over SqlDataReader?  Private Delegate Sub TGenerateListFromReader(Of T)(ByVal returnData As SqlDataReader, ByRef tempList As List(Of T))

Public Overrides Function GetAllCategories() As List(Of Category)
Dim sqlCmd As SqlCommand = New SqlCommand()
SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_CATEGORY_GETALLCATEGORIES)

Dim categoryList As New List(Of Category)()
TExecuteReaderCmd(Of Category)(sqlCmd, AddressOf TGenerateCategoryListFromReader(Of Category), categoryList)

Return categoryList
End Function

Public Overrides Function GetCategoryByCategoryId(ByVal Id As Integer) As Category
If Id <= DefaultValues.GetCategoryIdMinValue() Then
Throw New ArgumentOutOfRangeException("Id")
End If

Dim sqlCmd As SqlCommand = New SqlCommand()
AddParamToSQLCmd(sqlCmd, "@CategoryId", SqlDbType.Int, 0, ParameterDirection.Input, Id)
SetCommandType(sqlCmd, CommandType.StoredProcedure, SP_CATEGORY_GETCATEGORYBYID)

Dim categoryList As New List(Of Category)()
TExecuteReaderCmd(Of Category)(sqlCmd, AddressOf TGenerateCategoryListFromReader(Of Category), categoryList)

If categoryList.Count > 0 Then
Return categoryList(0)
Else
Return Nothing
End If
End Function

Private Sub TGenerateCategoryListFromReader(Of T)(ByVal returnData As SqlDataReader, ByRef categoryList As List(Of Category))
Do While returnData.Read()

Dim actualDuration As Decimal = 0
If Not returnData("CategoryActualDuration") Is DBNull.Value Then
actualDuration = Convert.ToDecimal(returnData("CategoryActualDuration"))
End If

Dim category As Category = New Category(CStr(returnData("CategoryAbbreviation")), actualDuration, _
CInt(returnData("CategoryId")), CDec(returnData("CategoryEstimateDuration")), CStr(returnData("CategoryName")), _
CInt(returnData("ProjectId")))
categoryList.Add(category)
Loop
End Sub
Hope this makes sense. Sorry if I have posted this in a wrong section..!
Cheers,Nirav

View 6 Replies View Related

[RESOLVED] Trying To Filter Some Data On SQL

Apr 14, 2008

Here is a simple grid view page I made.

http://visualboxscore.com/boxscores/cfb_box_scores.aspx

Ultimately I want to be able to filter every field that is listed. However, for now I am just learning this stuff and would like to just filter the by the name in the "offense" field.

However, it is not binding the selection thus not filtering it out. Do you see any problems in my code?

<%@ Page Language="VB" %>
<html>
<head id="Head1" runat="server">
<title>GridView DetailsView Master-Details (2 Page)</title>
</head>
<body>
<form id="form1" runat="server">
<b>Choose a team:</b>
<asp:DropDownList ID="DropDownList1" DataSourceID="SqlDataSource2" AutoPostBack="true"
DataTextField="offense" Runat="server" />
<asp:SqlDataSource ID="SqlDataSource2" Runat="server" SelectCommand="SELECT DISTINCT [offense] FROM [cfb_boxscores]"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>" />
<br />
<br />
<asp:GridView ID="GridView1" AllowSorting="True" AllowPaging="false" Runat="server"
DataSourceID="SqlDataSource1" DataKeyNames="offense"
AutoGenerateColumns="False">
<Columns>
<asp:BoundField HeaderText="Date" DataField="date" DataFormatString="{0:MM/dd/yy}" ItemStyle-HorizontalAlign="Center" SortExpression="date" />
<asp:BoundField HeaderText="Offense" DataField="offense" ItemStyle-HorizontalAlign="Center" SortExpression="offense" />
<asp:BoundField HeaderText="Defense" DataField="defense" ItemStyle-HorizontalAlign="Center" SortExpression="defense" />
<asp:BoundField HeaderText="Rush Yards" DataField="rush_net" ItemStyle-HorizontalAlign="Center" SortExpression="rush_net" />
<asp:BoundField HeaderText="YPC" DataField="yards_per_carry" DataFormatString="{0:#.##}" ItemStyle-HorizontalAlign="Center" SortExpression="yards_per_carry" />
<asp:BoundField HeaderText="Pass Yards" DataField="pass_yards" ItemStyle-HorizontalAlign="Center" SortExpression="pass_yards" />
<asp:BoundField HeaderText="YPA" DataField="yards_per_att" ItemStyle-HorizontalAlign="Center" SortExpression="yards_per_att" />
<asp:BoundField HeaderText="Total Yards" DataField="total_yards" ItemStyle-HorizontalAlign="Center" SortExpression="total_yards" />
<asp:BoundField HeaderText="YPP" DataField="yards_per_play" ItemStyle-HorizontalAlign="Center" SortExpression="yards_per_play" />
<asp:BoundField HeaderText="Points" DataField="points" ItemStyle-HorizontalAlign="Center" SortExpression="points" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" Runat="server" SelectCommand="SELECT [date], [offense], [defense], [rush_net], [yards_per_carry], [pass_yards], [yards_per_att], [total_yards], [yards_per_play], [points] FROM [cfb_boxscores]"
ConnectionString="<%$ ConnectionStrings:ConnectionString1 %>">
<SelectParameters>
<asp:ControlParameter Name="Offense" ControlID="DropDownList1" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>

overall I want to format the table look and and background but for now I just want to see how this stuff functions.

Thanks!!

View 3 Replies View Related

[Resolved] Use Correlation Names

Jun 18, 2008

I have a working sp:

SELECT dbo.Job.CompanyJobId, dbo.Item.UnitOfMeasure, dbo.Job.Name, dbo.Job.ChangeDate,
dbo.Region.CompanyRegionID, dbo.Job.Active,
sum(case dbo.SourceType.CompanySourceTypeId WHEN 'MA' then dbo.ProductionEvent.AlternateQuantity ELSE 0 END) AS material,
sum(case dbo.SourceType.CompanySourceTypeId WHEN 'PR' THEN dbo.ProductionEvent.Quantity ELSE 0 END) AS production

FROM dbo.job
inner join dbo.Event ON dbo.Job.JobGuid = dbo.Event.JobGuid
inner join dbo.ProductionEvent on dbo.Event.EventGuid = dbo.ProductionEvent.EventGuid
left outer join dbo.Product ON dbo.ProductionEvent.ProductGuid = dbo.Product.ProductGuid
left outer JOIN dbo.Item ON dbo.Event.ItemGuid = dbo.Item.ItemGuid
inner JOIN dbo.Source ON dbo.ProductionEvent.SourceGuid = dbo.Source.SourceGuid
inner JOIN dbo.SourceType ON dbo.Source.SourceTypeGuid = dbo.SourceType.SourceTypeGuid
left OUTER JOIN dbo.Region ON dbo.Job.RegionGuid = dbo.Region.RegionGuid

WHERE dbo.Job.CompanyJobId = 3505048 and dbo.Item.UnitOfMeasure = 'TN'
and(dbo.SourceType.CompanySourceTypeId = 'PR' or dbo.SourceType.CompanySourceTypeId = 'MA')

GROUP BY dbo.Job.CompanyJobId, fMeasure, dbo.Region.CompanyRegionID,
dbo.Job.Name, dbo.Job.ChangeDate, dbo.Job.Active

Now I need to inser another join like this:

dbo.Event ON dbo.EmployeeLaborEvent.EventGuid = dbo.Event.EventGuid INNER JOIN

and I get error:

Server: Msg 1013, Level 15, State 1, Line 15
Tables or functions 'dbo.Event' and 'dbo.Event' have the same exposed names. Use correlation names to distinguish them.

Not sure what this means. Thank you.

View 7 Replies View Related

[Resolved] What Are Instance Parameters

Jun 19, 2008

I am reading over a job description and I am unsure of that the employer is refering to when they say "Instance Parameters".

Here is the context that it is used in.
* Tune and optimize SQL statements, Instance Parameters, and Data Storage including the identification of performance related issues.

View 3 Replies View Related

Default Contraint *** RESOLVED***

Aug 16, 2005

You can't have but one default contraint in a DB named
df_revisiondate Default getdate()

I thought that sense they were being created on different Tables that it would not matter. It was a way to maintain a type of consistency by giving them the same name. However, it SEEMS to have caused all my tables to crash.

thanks!

View 5 Replies View Related

[resolved]-joining 3 Tables

Oct 14, 2005

Hi all.. i have a problem.

Let say i have 3 tables. Let's name it Main, table2, table3. in table Main, there are 4 colums(M_id,M_name M_tbl2, M_tbl3). In table2 and table3, each has 3 colums. For table2 the colums are id, tbl2Name, tbl2Desc and for table3(id, tbl3Name, tbl3Desc).

M_tbl2 will refer to id in table2 and M_tbl3 will refer to id in table3. How am i going to get M_id, M_name, tbl2Name, tbl3Name in one query?

View 4 Replies View Related

Add Column To A View - RESOLVED

May 3, 2006

I am creating a view in SQL using the View tab in the database and adding the table and the fields I need. For criteria I need to have 28 'or' s . How do I insert more columns on the end of my view ?

View 2 Replies View Related

Reset Key Field To 1 RESOLVED

Nov 29, 2006

I have test tables with key fields that increment by one each time a record is added. If I delete all the records in a table (using a delete query) is there a way I can make the key start at 1 again.

The reason I ask is that by using test data in these tables (and there are a lot of records),when I clear them out and append the live data the key field starts at something like 764525

View 1 Replies View Related

Edit Scheduled Job RESOLVED

Jun 6, 2007

Sorry if this sounds dumb but I can't find the answer . I have created a scheduled job on my test database using the wizard. How do I edit it or delete it ? Step by step instructions please

I have never done this before so am just experimenting at the moment.

View 1 Replies View Related

[RESOLVED] COALESCE Script

Aug 13, 2007

I have a table NUMBERS in which I have Column1 and Column2. Column1 will always be a unique number, yet Column2 may have duplicates.

What I would like to do is return all the data in Columns 1 and 2, yet have Column1 return as a comma seperated value.

Column1 Column2
1 15
2 16
3 16
4 17

Return:
Column1 Column2
1 15
2,3 16
4 17

Any ideas will be great!

Thanks

View 14 Replies View Related

[RESOLVED] SQL String Array - How To

Jan 25, 2008

Hello All,

I have about 10 different insert into statements which I would like to include into a loop of some sort. Here is what I am trying to accomplish.

SET @aryTableNames = 'thisTable','thatTable','anotherTable'

DO
SELECT * INTO [Server].[dbo].[@aryTableNames]
FROM OPENQUERY(mysqlDB, 'SELECT * FROM `@aryTableNames`')
LOOP

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved