How To Set My ASP.NET Application To Access SQL Server 2005 Using Client's User Credentials?
Jan 29, 2007
Hi guys,
I'm not sure if I'm just bad at googling but I can't seem to find a way to set an ASP.NET 2.0 web application to connect to SQL Server 2005 using the current client's user credentials. My web application is using Integrated Windows Authentication so its Page.User.Identity is set to a DOMAINusername value... I want to pass that to my connectionstring or have my connections pick up the identity automatically and use that Identity when accessing the db server.
Oh and another thing, my IIS Application Pool is using a specific Identity itself, so I don't know if that might affect the above.
Hope someone could help.
View 2 Replies
ADVERTISEMENT
Mar 24, 2015
I have to create a query that will be returning the users and the application modules they have access for. Along with the list of users and modules the query should also return if any module is not accessible for that user.
The 'ApplicationUsers' table is like this:
CREATE TABLE #ApplicationUsers
(
userId INT,
UserName VARCHAR(50)
)
INSERT INTO #ApplicationUsers VALUES
(1, 'Daniel'), (2,'Martin'), (3, 'Brandon'), (4, 'Doug')The 'ApplicationModule' table is like this:
[Code] .....
I used pivot query but there are a couple of limitations in it(may be I am making mistakes in it). First, the pivot columns are static whereas I need dynamic column names(Application Modules). Second, I need to include all the users with all the modules with access or without access that I am unable to achieve.
View 5 Replies
View Related
Oct 18, 2006
Hi all...
I am writing a Windows Application which will be used by about 100 clients. (NT Authenticated)
The application is going to be used in a LAN enviroment. User who have access will download a VB.NET application from a web site.
Of course, I want to prevent any of the 100 users from using a tool such as Query Analysis or ODBC to connect directly to the database and modify data.
So, it appears the way to go is to the "Application Roles". For this to work, the application roll password has to be saved in the application to execute the sp_setapprole procedure.
Is there a way to secure this password? I am worried about a user somehow extracting the password from the application and connecting directly.
Am I on the right track here? Any ideas appreciated!
Thanks,
Forch
View 4 Replies
View Related
May 5, 2006
Hi All,
I've developed an application that connects to a SQL Server 2005 Express database. I created a DSN to connect to the database through ODBC. Currently, I am testing locally and everything works fine.
I would now like to install my application on another workstation and connect remotely to the database located on my development machine.
The client workstation does not have SQL Server 2005 Express installed on it because I would just like my application to connect remotely by creating the DSN and using ODBC. What I'm missing here are the database drivers. The "SQL Natice Client" is not available on this client workstation. How can I deploy the necessary drivers with my installation file so that I may create the required DSN name using the SQL Native Client driver?
Thanks!
View 6 Replies
View Related
Nov 6, 2006
I am using SQL Express 2005 and VB .net Express.
Question 1:
How can I get the result stored in Inserted.ColName (by Output clause of insert command). In the documentation (BOL) for SQL 2005, there is written "returned to the processing application for use" in Output clause (first paragraph).
Question 2:
How to store Inserted.ColName into local variable when insert command is running in stored procedure.:
View 8 Replies
View Related
Jan 24, 2008
Hi there
If I give the user access dbo on 1 of the database, when he logon using SQL Server Management Studio for running query etc, can he only see his database instead of other as well system database?
Is there any best practise in term of setting the SQL client for 2005?
Thanks
View 2 Replies
View Related
Jun 21, 2007
I've installed SQL 2005 Express, enabled local and Remote connections but my client app cannot connect to the SQL server. I'm getting access denied or SQL does not exists. Any idea's on how to resolve this issue?
View 1 Replies
View Related
May 3, 2007
How can I access data to SQL server 2005 using Windows form application,ADO.net and .Net remoting?
Can anybody help me? please...
View 5 Replies
View Related
Nov 17, 2007
Here is my situation: I am creating a database driven ASP.Net web application that will be used over the internet. My ASP.Net application connects to my SQL server 2005 database/server by using a SQL server login. I am using the DPAPI API to encrypt my connection stings with a hidden entropy value for extra security. I am using the SQL login for obvious reasons, as my users will not have a windows login.
What I am trying to do: I want to limit this SQL login account to be able to just run/execute stored procedures and NOT access the tables or views directly. In my ASP.Net application I am using the MS applications data block, and I am using stored procedures for every single database access action. There is no inline SQL being executed from my web application.
What I have tried so far:
I created a new schema and made the above SQL login account owner of this schema. I then granted "Execute" permissions to the SQL login and DENY permissions to all other permissions.
I created an database role with "Execute" only permissions and DENY permissions to all other permissions.
What Happened: In BOTH of the above scenarios I tested a direct SQL statement against one of my tables, from my ASP.Net application and I was able retrieve data back, NOT GOOD, exactly what I am trying to STOP.
If someone could give me (Step-by-Step) guide on how to setup the situation I am looking for, I would be very grateful!
Thanks to all that help!
View 13 Replies
View Related
Feb 18, 2006
Hi,
I am using VS2005 C# + sql server 2005 Express edition.
I need to using a database that uses my own defined data types to define its tables columns.
I already have designed a Database projact and create the new UDT as follows:
Create a new Database project in the Visual C# language nodes.
Add a reference to the SQL Server 2005 database that will contain the UDT.
Add a User-Defined Type class.
Write code to implement the UDT.
Select Deploy from the Build menu.
Now I need to ask some quistions:
1- When I try to add a new query to a table that contains my new data type in its columns,if I try to exexute the query the next message appears:
'Execution of user code in the .Net framework is disabled. Enable "clr enabled" configuration option'.
How can I doing that??
2- I need to use that database - which has the new data type - in a traditional ' Visual C# Windows Application' instead of 'Database', but:
when I try to add a new Data Source that contains the tables that have the new data types in its definitions, the next message appears:
'<AyaDatabase.dbo.MyNewUDTTable>
User-defined types(UDTs)are not supported in the Dataset Designer.'
So, how can I resolve that problem??
please help me.
Thanks in advance for any help.
Aya.
View 4 Replies
View Related
Jul 24, 2006
Hi,
I have a database working on SQL Server 2005 Standart Edition and i want to create a client windows form aplication.
My problem is where to do it? Im trying to use MS visual basic 2005 express edition but it doent support SQL Server 2005 Standart Edition, it only supports SQL 2005 express edition.
What should i do ?
And in the visual studio 2005 that comes with the package of SQL Server 2005 standart edition there is no project of a winodws form.
Please help
View 8 Replies
View Related
Dec 7, 2006
This is my first time to deploy an asp.net2 web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed" (only in pages that try to access the database)
Help pleaseee
View 3 Replies
View Related
Oct 24, 2006
Hi
I developed a windows application in Visual studio 2005 and the database is sqlexpress.
I wanted my application to run on another system.For that i have installed sqlexpress 2005 on that machine.But that machine doesn't show me any enterprise manager or query manager for sqlserver.
Is there any solution for this.
Thanks
View 3 Replies
View Related
Jan 12, 2007
Problem:
I am trying to create an asp.net website with integrated windows authentication
to access SQL databases. IIS resides on WinXP and SQL Server
on Win2000 SRV. Both are in the same NT Domain. IIS and SQL Server cannot
reside on the same machine and a stand alone web server is
ideal as the website needs to access multiple SQL Servers. IIS is set to
Integrated Windows Authentication. The machine running IIS & the SQL Server
are set to be "trusted for delegation" in active directory. The domain user
accounts that will be accessing the databases are not marked as "Account
is sensitive and cannot be delegated".
The connection string that the web app uses to connect to SQL database is:
"Data Source=PWSSQLT;Integrated Security=SSPI;Initial Catalog=Pace_Master;Persist Security Info=true"
with which the user credentials should be flown to the SQL database.
But instead the delegation fails and results in the following ANONYMOUS authentication failure error:
Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.
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 'NT AUTHORITYANONYMOUS LOGON'.
Source Error:
// Open the connection, and return it
oConn.Open();
return oConn;
Source File: e:ING eIMSApp_CodeDataAccessConnectionManager.cs
Stack Trace:
[SqlException (0x80131904): Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader
dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject,
SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,
SqlConnectionString connectionOptions, Object providerInfo, String newPassword,
SqlConnection owningObject, Boolean redirectedUserInstance)
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options,
Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
owningConnection, DbConnectionPool pool, DbConnectionOptions options)
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open()
INGRS.DataAccess.ConnectionManager.GetConnection() in e:ING eIMSApp_CodeDataAccessConnectionManager.cs:
DAActivity.Page_Load(Object sender, EventArgs e) in e:ING eIMSDADAStatusDAActivity.aspx.cs
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
_______________
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
---------------------
View 6 Replies
View Related
Dec 18, 2007
We are using Crystal Report Services XI to generate reports from SQL Server 2000 database running on server within the same domain (LAN).
for some reason, SQL Server is rejecting the Credentials that is provided to CR Services, the user has right to that database. When We run the report manual, it works fine, but when we run Automatic on schedule , it fails.
The Authentication mode is set to Mixed.
The Startup Service accoutn is set to "This Account"
Any idea, why would this failure on User is encoutered.
Thanks,
View 1 Replies
View Related
Jun 9, 2015
When i wanna run Application in other computers in network. The following error occurs.
error : System.Data.SqlClient.SqlException: Login failed for user 'Suren-PCGuest'.ConnectionStr = "Data Source=SUREN-PCMSSQLSERVER,1433;Initial Catalog=WorkFlow;Integrated Security=True";
View 5 Replies
View Related
Jul 27, 2006
I using MS SQLServer as a secure method of setting up system tasks andprocesses for automated running. The intent is that all logins (idsand passwords) are in a secure database table and are not sittingaround in batch files on the server.Some of the tasks make use of network authentication, and this is wherethe problem arises.If I execute the command line from within SQLServer (via xp_cmdshell),I get an error that says that the userid is missing. If I execute thatsame command vid the CMD window, it works.It appears that the shell that xp_cmdshell kicks off does not inheritthe domain authentication.Aside from questions on why I am doing things this way as opposed tousing the windows scheduler or other tools, what do I need to do tomake sure that my domain credentials are passed?
View 1 Replies
View Related
Apr 16, 2007
Hi folks,
I have an application designed in vb.net and it needs to Communicate with MS SQL 2005 database which resids on SERVER and The applicaton needs to run from Client PCs... When i install the Application on Server itself it works fine.... But when i Install it on any of the client Pcs it gives me the following error....
Unable to install or run the application. The application requires that assembly Microsoft.sqlserver.ConnectionInfo version 9.0.242.0 be installed in Global Assembly Cache (GAC) First.
Any help guys ???
View 3 Replies
View Related
Sep 12, 2007
hie,
have a question. what tool is available to develop client/server application with db as ms sql server? is it only visual studio.
for example: i was using oracle 9i db with 9i developer as a total package to build applications. very easy with creating update, delete or new forms.
is it possible with visual studio or am i missing something?
i need to feel comfortable since i know sql server but dont know what to use for developing application.
many thanks,
farouque
View 2 Replies
View Related
Jul 6, 2007
I have deployed some reports on the reporting server, i have noticed that every one in the domain in which the reports are published can access the reports, except one user. when he tries to access the report he got the following error message or the blank report.
"An error occured during report processing"
"can no read the next data row for the data set dataset1".
Although this user has all the roles on the reporiting server kike browser,content manager etc.
i tried many things but still problem persists.
Can anyone tell me the exact reason for this ?
I shall be extremely thankfull.
View 1 Replies
View Related
Apr 28, 2008
Hi all hope some one can help - please bear with me new to this
Basically I have had to change pc's so I copied and pasted my ASPNET.MDF and LDF from my old pc to new PC including webpages/apps etc.. created.
However now all I get is "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path """"
Just don't understand what permissions the db should have, does it need to match the SQL Express owner...
any help would be most appreciated
Thanks
Chris
View 5 Replies
View Related
Jun 21, 2005
I installed my asp.net 2.0 web application and sql express june editon on my windows 2003 server.When the application tries to reach the database i am getting the following error"Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed."I can understand that it has something to do with user right but more than that I am pretty lost. Can anyone translate this error for me and give me some tips on what do to.I checked first the user running the sql express service and saw it was the NETWORK SERVICE user. I changed it to be the local system account but that did not make any difference. The application is running just fine on my local computer(Win XP sp2). This one has SQL express April edition though.
View 3 Replies
View Related
Jun 9, 2014
I have a procedure where after processing, i am required to send multiple message to calling application.
For ex:
create procedure test as
(@a as int,
@b as int
@c as int )
/*
some transformations */
print 'variable a is' + @a;
print 'variable b is' + @b;
print 'variable c is' + @c;
I am only providing a sample of return messages, but in reality there a lot more messages where a string and a parameter value need to concatenated.Unfortunately print is not allowing to concatenate parameter value.I can use RaiseError, but these messages are not really any error messages.
i tried to concatenate all message and output it using OUT type parameter, but the length of all messages combined exceeds 10000 characters.
Is there any other alternate to send these messages out to application?
View 1 Replies
View Related
Jul 20, 2005
SServer PC: Win SBS 2003 with 2.6 GHz processor and 1GB RAMSQL Server 2000 v 2000.8.00.76 (sp3)MS Office 2k3MSJet ms04-014 (latest ost sp8)MDAC v2.8 RTMADO 2.1vb6.exe / ADO 2.0I think this is a SQL Server/ADO problem as I have 2 applications withsame problem.My access database uses a timer based function to insert records intoSQL Server using ADO and stored procedures. Access also uses DAO ,Jet/ odbc to linked tables on SQL Server for many other tasks/forms.All is well when Access 1st run but after a few hours or so the Accessapp grinds to a halt.Upon checking the task manager the mem usuage upto 160MB and handlecount upto 86,000 ! (cpu process % is low).After the "Access Fail" if I stop/start access only, performance isnot returned, I have to stop/start SQL Server.It would seem that allconnections from this PC to SQL server are badly affected, it is nottied to the client application that had the problem.As I could not work out where the problem was I took the Accessfunctionality into a VB6 app, using ADO 2.0, thinking this shouldsimplify matters with Jet and ODBC out of the way.I now have the same problem with the number of handles increasing withevery new timer based function.* code snippet example *If Not OpenConnection Then 'we have not been able to open aconnection to SQL serverCall procLog("Connection failed to SQL server")Exit FunctionEnd If'gVar.cnnSQL is my public ADODB.ConnectionSet cmdSQL = New ADODB.CommandWith cmdSQL.ActiveConnection = gVar.cnnSQL.CommandText = "MyDB.dbo.insert_tblMyData".CommandType = adCmdStoredProc.Execute RecordsAffected:=lngRecs, _Parameters:=Array(lngID, dtDate,intCategory,strNationality,strNotes,strName)End With* code snippet *** After the "Access Fail" if I look at one of my clients, running thesame Access app on another PC, it seems normally responsive when usingone my bound forms to browse the data from same SQL Server **Any ideas anyone ?
View 3 Replies
View Related
Sep 11, 2007
My application is written in C/C++ on Linux platform. I am wondering if there is a C/C++ driver for Linux to access SQL server.
thanks.
View 3 Replies
View Related
Jul 24, 2007
I am tring to access the SQL 2005 Express which installed in remote machine. Front end app is on Visual Studio 2005. Try to connect SQL Express using the application Layer which is installed on the computer where SQL Express is installed. Could not fetch data from the SQL Express. What could be the problem?
With Regards,
ADK
View 1 Replies
View Related
Sep 12, 2007
Hi,
I'd like to programme the execution of a report through the execution property option. However, when I try to do it a message error appears related to credentials of the datasource.
The present action is impossible to complete, because the credentials of the user datasource needed to execute this report are not stored on report server database.
I've tried all possible combinations.
Any idea?
Thanks.
View 2 Replies
View Related
Feb 26, 2008
To whom it may concern,
I have developed a web application using ASP 3.0 with a Access DB 2002 backend. I have decided to recently to upgrade the database to SQL 2005 but I am having issues that I cannot work out because I am new to MsSql Language. It appears that the FORMAT function in Access does not work in MsSql ( does not recognise the function ) along with some of the PIVOT and TRANSFORM calls (coming up with "Syntax error near "..."") . Please see the below code. The areas that are showing up as errors when the application is run are highlighted in red.
Thanking you in advance
Darren
<!-- #include file="./../../common/includes/i_header_login.asp" -->
<link href="../../common/css/proceduremanual.css" rel="stylesheet" type="text/css">
<%Sub RecordsetToCSV(ByRef RS, ByVal CSVFilePath, ByVal IncludeFieldNames)
Set objCSVFile = CreateObject("ADODB.Stream")
Call objCSVFile.Open
If IncludeFieldNames Then
'string concatenation issues aren't a problem for a small string of field names
For Each Field In RS.Fields
If FieldNames = "" Then
FieldNames = Field.Name
Else
FieldNames = FieldNames & "," & Field.Name
End If
Next
FieldNames = FieldNames & vbCRLF
Call objCSVFile.WriteText(FieldNames, 1)
End If
Call objCSVFile.WriteText(FieldNames & RS.GetString(adClipString, , ",", vbCRLF, ""))
Call objCSVFile.SaveToFile(CSVFilePath, 2)
Set objCSVFile = Nothing
End Sub
%>
<%
function evaluate(pFormula, pUserID, pMonth, pYear)
if isnull(pFormula) then
evaluate = 0
exit function
end if
x = 0
key = ""
zero = "0"
nine = "9"
eFormula = ""
lf = len(pFormula)
for i = 1 to lf
c = mid(pFormula,i,1)
if x = 1 and c >= zero and c <= nine then key = key & c
if x = 1 and (c < zero or c > nine or i = lf) then
set rsd = cn.execute("select sum(total) from Data where UserID = " & pUserID & " and month(weekEnding) = " & pMonth & " and year(weekEnding) = " & pYear & " and GroupTaskID=" & key)
eFormula = eFormula & rsd.fields(0)
rsd.close
key = ""
if c < zero or c > nine then x = 0
end if
if c = "v" then
key = ""
x = 1
end if
if x = 0 then eFormula = eFormula & c
next
on error resume next
evaluate = round(eval(eFormula),0)
'if err then evaluate = err.description & ": " & eformula
if err then evaluate = 0
end function
%>
<%
period = split(request.form("period"),",")
if ubound(period) = 1 then
mmmm = period(0)+0
yyyy = period(1)+0
else
mmmm = 0
yyyy = 0
end if
%>
<div align="left" class="MainBodyText" style="width: 100%; height: 100%">
<div align="left" valign="top" width="200" style="margin:5; padding:3; font-family:arial; font-size:10pt; font-weight:bold; font-color000000;" >
<% if session("groupid") = 1 then%>
<a href="../main/administration.asp"> <<< Administration Home</a><br><br>
<a href="manager_report.asp"> <<< Managers Report Home</a>
<%end if %>
<%if session("groupid") = 2 then%>
<a href="../main/manager.asp"> <<< Manager Home</a><br><br>
<a href="manager_report.asp"> <<< Managers Report Home</a>
<%end if %>
<%if session("groupid") = 3 then%>
<a href="../main/user.asp"> <<< User Home</a>
<%end if %>
<%if session("groupid") = 4 then%>
<a href="../main/general.asp"> <<< Home</a><br><br>
<a href="manager_report.asp"> <<< Managers Report Home</a>
<%end if %>
</div>
<p align="center" class="MainBodyText">
<img src="../../images/si.gif" align="center"><br><b>Month to Date Dashboard</b></p>
<p align="center" class="MainBodyText">
To use the Print Page function please select the period required then select
view report. You can then select Print Page which will print out the rendered
page.</p>
<form name="f1" method="POST" action="dialmtd.asp">
<div id="printReady">
<table align="center" border="0" width="663" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2">
<tr>
<td align="left" width="127"><font face="Arial" size="2">
<select name="benchmarkgroup" style="color: #000000; border: 0px solid #000000; background-color: #FFE737">
<option value="0" <%if request.form("benchmarkgroup") = "" then response.write "selected"%>>Select Report
<% set rs = cn.execute("select TaskGroupID,TaskGroup from BenchmarkGroups where Active = 1 order by TaskGroupID")
do until rs.eof
if request.form("taskgroupid")+0 = rs.fields(0) then selected = "selected" else selected = "" %>
<option value=<%=rs.fields(0) & " " & selected%>><%=rs.fields(1)%>
<% rs.movenext
loop
rs.close %>
</select>
</td>
<td align="left" width="143"><font face="Arial" size="2">
<select name="period">
<option value="" <%if request.form("period") = "" then response.write "selected"%>>Select Period
<% set rs = cn.execute("select year(WeekEnding), month(WeekEnding), format(Weekending,""mmmm yyyy"") from data group by Year(WeekEnding), Month(WeekEnding), format(WeekEnding,""mmmm yyyy"") order by 1,2")
do until rs.eof
x = rs.fields(1) & "," & rs.fields(0)
if request.form("period") = x then selected = "selected" else selected = "" %>
<option value=<%=x & " " & selected%>><%=rs.fields(2)%>
<% rs.movenext
loop
rs.close %>
</select>
</td>
<td align="left" width="117"><font face="Arial" size="2">
<select name="stateid">
<option value="0" <%if request.form("stateid") = "" then response.write "selected"%>>All States
<% set rs = cn.execute("select stateid,state from tblState where benchmarkactive order by state")
do until rs.eof
if request.form("stateid")+0 = rs.fields(0) then selected = "selected" else selected = "" %>
<option value=<%=rs.fields(0) & " " & selected%>><%=rs.fields(1)%>
<% rs.movenext
loop
rs.close %>
</select>
</td>
<td align="left" width="127"><font face="Arial" size="2">
<select name="countryid">
<option value="0" <%if request.form("countryid") = "" then response.write "selected"%>>All Countries
<% set rs = cn.execute("select countryid,country from tblCountry where benchmarkactive order by country")
do until rs.eof
if request.form("countryid")+0 = rs.fields(0) then selected = "selected" else selected = "" %>
<option value=<%=rs.fields(0) & " " & selected%>><%=rs.fields(1)%>
<% rs.movenext
loop
rs.close %>
</select>
</td>
<td align="left" width="129"><input type="image" src="../../Images/view-report.gif" onclick="f1.submit()" name="f1" alt="Click Here to Generate Report"></td>
<td width="127"><input type="image" src="../../Images/print-report.gif" rname="printMe" onClick="printSpecial()" alt="Click Here to Print the Page"></td>
</tr>
</table>
<% if mmmm > 0 then %>
<table border="0" width="450" align="left" style="margin-left:10px; border-collapse: collapse" bordercolor="#111111" cellpadding="2" cellspacing="4">
<thead>
<tr>
<% sql = " where 1 = 1 AND BenchmarkGroup =" & request("benchmarkgroup")
if request.form("stateid")+0 then sql = sql & " and stateid = " & request.form("stateid")
if request.form("countryid")+0 then sql = sql & " and countryid = " & request.form("countryid")
set rs = cn.Execute("TRANSFORM First(UserID) SELECT description, minimum, mintype, formula FROM BenchmarksActiveUsers" & sql & " GROUP BY displayOrder, description, minimum, mintype, formula ORDER BY displayOrder PIVOT Name")
lastfield = rs.fields.count-1
s = 4 %>
<td align="left" bgcolor="#C0C0C0"><font face="Arial" color="#000000" size="2"><b>Benchmark</b></font> </td>
<td align="center" bgcolor="#C0C0C0"><font face="Arial" color="#000000" size="2"><b>Company Average</b></font> </td>
<% for i = s to lastfield %>
<% next %>
</tr>
</thead>
<tbody>
<br>
<% dim v()
do until rs.eof
min = int(rs.fields("minimum"))
mintype = rs.fields("mintype")
sumv = 0
avg = 0
n = 0
for j = s to lastfield
redim preserve v(j)
v(j) = evaluate(rs.fields("formula"),rs.fields(j),mmmm,yyyy)
sumv = sumv + v(j)
n = n + 1
next
if n > 0 then avg = round(sumv / n) %>
<tr><td></td><td align="center" valign="bottom"><font face="Arial" size="2">Target: <%=min%> <%=mintype%></font></td><td></td></tr>
<tr>
<td bgcolor="#FFFFFF">
<p align="right"><font face="Arial" size="2"><%=rs.fields("description")%></font></td>
<td bgcolor="#FFFFFF">
<p align="center"><font face="Arial" size="1"><% If (avg/min)*100 <=12 Then %><IMG SRC="../images/dial-1.gif">
<% ELSEIF (avg/min)*100 <=24 Then%><IMG SRC="../images/dial-2.gif">
<% ELSEIF (avg/min)*100 <=36 Then%><IMG SRC="../images/dial-3.gif">
<% ELSEIF (avg/min)*100 <=48 Then%><IMG SRC="../images/dial-4.gif">
<% ELSEIF (avg/min)*100 <=60 Then%><IMG SRC="../images/dial-5.gif">
<% ELSEIF (avg/min)*100 <=72 Then%><IMG SRC="../images/dial-6.gif">
<% ELSEIF (avg/min)*100 <=86 Then%><IMG SRC="../images/dial-7.gif">
<% ELSEIF (avg/min)*100 <=99 Then%><IMG SRC="../images/dial-8.gif">
<% ELSEIF (avg/min)*100 =100 Then%><IMG SRC="../images/dial-9.gif">
<% ELSEIF (avg/min)*100 <=112 Then%><IMG SRC="../images/dial-10.gif">
<% ELSEIF (avg/min)*100 <=124 Then%><IMG SRC="../images/dial-11.gif">
<% ELSEIF (avg/min)*100 <=136 Then%><IMG SRC="../images/dial-12.gif">
<% ELSEIF (avg/min)*100 <=148 Then%><IMG SRC="../images/dial-13.gif">
<% ELSEIF (avg/min)*100 <=160 Then%><IMG SRC="../images/dial-14.gif">
<% ELSEIF (avg/min)*100 <=172 Then%><IMG SRC="../images/dial-15.gif">
<% ELSEIF (avg/min)*100 <=186 Then%><IMG SRC="../images/dial-16.gif">
<% ELSEIF (avg/min)*100 =>187 Then%><IMG SRC="../images/dial-17.gif">
<%END IF%></font></td><td><img src="../images/under-target.gif"><br><br><img src="../images/over-target.gif"></td>
</tr><tr><td></td><td valign="top" align="center"><font face="Arial" size="2">Actual: <%=avg%> <%=mintype%></font><hr></td><td></td></tr><% for j = s to lastfield
color = "#000000"
if int(v(j)) < min then color="#FF0000" %>
<% next %>
</tr>
<% rs.movenext
loop
rs.close
cn.close
set cn = nothing %>
</tbody>
</table>
<% end if %>
</div>
</form>
</div>
<!-- #include file="./../../common/includes/i_footer.asp" -->
View 5 Replies
View Related
Jun 18, 2007
Hello friends,
In my web application I have saved my connection string into web.config file. Now I have to send this web application to the client in the form of web set up. The issue is that on the client side, user credentials for the database will be different. So can we do some setings that the web application whenever will run should ask for the server name, username & Password. If this can be done then the application can be run anywhere considering all compatibilities.
Please let me know how this can be done.
Thanks & RegardsGirish Nehte
View 2 Replies
View Related
Nov 30, 2006
I have a site I created in .Net 2.0 the site is using sql server 2000 on the network. On the development machine the site is working as it should. I have also installed sqlexpress on the web server. I then push the site up to my server and I get the "unable to access sql 2005 pipes error". I installed vs2005 on the web server. when I run the app in vs2005 I don't get any errors and the application comes up. The app's connection string is placed in the web config file. I also changed the sqlexpress for local and remote logins.
What else could be the problem. I have never seen this before. And all the non DB sites work!
Enviroment:
Webserver Windows Server 2003, .Net 2.0 framework, iis6, sqlexpress, vs2005
Database SQL2003
View 2 Replies
View Related
Jan 1, 2007
we have run access 2003 application using SQL 2005 server
and the data transfer rate is extreamly slow.
we are using ODBC connection
and the access apllication works very fast with SQL 2000.
we have the tested the comptabilty of the application to SQL 2005 with Microsoft wizard and it had no problems.
even when i run simple application on the sql 2005 server, it runs very slowly.
i am using the MDAC clients ODBC component and the SQL Native Clients one.
which eliminates the possibilty of network problem.
what could be the problem???
View 1 Replies
View Related
Oct 16, 2007
Hi,
I Created Report using shared data source but when I try to run this report using dynamic connection string parameter I am getting error
I supplied parameter to connection string is
"data source=" & Parameters!Server.Value & ";initial catalog=" & Parameters!Database.Value &";user id="Parameters!LoginID.Value & ";password="Parameters!Password.Value
I also created these parameters like Server, Database, LoginID, Password in report paramenters
but when I try to run this I am getting either of these errors
error no 1.The current action cannot be completed because the user data source credentials that are required to execute this
report are not stored in the report server database. (rsInvalidDataSourceCredentialSetting)
error no 2.An error has occurred during report processing.
Cannot create a connection to data source 'SRVDataSource'.
For more information about this error navigate to the report server on the local server machine, or enable remote errors
Please help me out
T.I.A
View 1 Replies
View Related
Jun 6, 2007
Hello All,
I have a situation and no idea what is going wrong.
We have many reports stored and view from the report manager. many of these reports internally use a datasource which is shared among others.
Many a times we have realised that the report stops working with the error.
Reporting Services Error
The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database. (rsInvalidDataSourceCredentialSetting) Get Online Help
SQL Server Reporting Services
All i have to again do is update the user credentials and it starts working again. but nobody explicitly remove the credentials also. i dont know if it a tools bug or some where i am making a mistake in deploying. i deploy the reports through visual Studio.
Any idea?
/Soni
View 1 Replies
View Related