Problem After Upgrading Access Database To Mssql
Jan 21, 2004
Oke here is the problem. I hope sombody can help me with it.
After a lot of discussion, I finaly got the people that control the MS SQL server with my appertment as far to allow me to upgrade my access database to the MS SQL server.
After this I've created an access project. Devellopping in access I concluded I made a mistake in the rowsource property of one of the tablefields. The people that control the MS SQL server don'n allow me to make changes to the database structure from within access. So I've to write a SQL statement to change this.
example:
fields table1: id_document, id_document_type, document_name
fields tabel2: id_document_type, document_type_description.
the field id_document_type from table 1 is defined as a combo/list box tha contains the values from the field document_type_description from table 2.
I hope somebody can tell me if it is possible to write an SQL statement for this problem and how it shoud look like ?
thank you
View 1 Replies
ADVERTISEMENT
Nov 18, 2006
I have a database that is in mssql and I'm using an odbc link to an access database where I want to add records to the mssql table. When I open the linked table in access it does not allow me to add a record. I have created a user account in mssql that has ownership to the database and I use this user in setting up the odbc link.
View 3 Replies
View Related
Mar 11, 2004
I have read a few books on SQL Server and on access. I recently got my 1st programming job (vb.net)
I want to move my database from Access to SQL server. But I would like to Use access as the front end for simple data entry, queries and reports. I dont know how to do this,, (using Access as a front end for SQL Server)
Can anyone recomend topics of interest or a good book?
Thanks
~M
View 6 Replies
View Related
Jan 18, 2008
How to convert a database in MSSQL 2000 to MSSQL 2005 database.Is there any tool or documentation available for this?
View 3 Replies
View Related
Feb 21, 2005
My current website is based on access and running fine but a bit slow, the size of the file have always increase rapidly (i don't know why) and I have to download the mdb file every week, using access to compact it and send it back to the hosting company's server. Therefore I concern to upgrade it to SQL server or MSDE. I never used any of them and I have no idea how they work. Here are a few questions:
1, Should I use SQL server or MSDE? I know the differences among access, SQL server and MSDE, but I am curious why is MSDE free? are there any limitation or anywhere worse then access? (considering access does cost money but less powerful then MSDE)
2, Is there a file size problem like what I got with mdb files? it is very important to me because I have limited space for the hosting company.
3, I downloaded MSDE and installed into my WindowsXP, and what I see is only an icon in the task bar any nothing else. I have no clue how it work at all. What else do I need for the upgrade? What are the steps?
4, It seems SQL server and MSDE are tightly integrated into the system. Can I still have a database file and upload it to the hosting company just simply replace the mdb file? Please if someone could provide any tutorial how to run and manage MSDE.
Thankyou
View 1 Replies
View Related
Dec 19, 2001
Hello
I have a problem regarding the importing the access database in the SQL server 7.0.
We have a matrimonial portal named www.viwahmandap.com which is using an access database.We are using the dsn to access this .mdb file. Now we will be upgrading to SQL 7.0.The server administrator won't
do anything like importing the access database .So i will have to download the access database on our domain ,import this access file into an SQL database using the DTS wizard which is available in SQL 7.0(This i can do). This will create the respective .mdf & .ldf files.Now What are the next steps to be followed at my end? What should i ask for from the the server administrator?Are there any changes required in my ASP application.What else should be done?Please help.
Ashish
View 1 Replies
View Related
Dec 8, 1998
Hi,
I have just tried to upgrade an Access database for the first time. All the tables & data have been moved into SQL Server, but all the Primary Keys & Foreign Keys have disappeared. The Primary Key columns are marked as allowing NULL values in SQL Server, and I can't change them to be NOT NULL.
I used the ACCESS export facility to upgrade the database.
Can anyone help me put the constraints into the SQL Server database???
Thanks
Steve
View 1 Replies
View Related
Sep 10, 2013
We are entertaining the idea of moving our data to a cloud and I need to know how to convert my Access backend DB to SQL. which version of SQL will I need to use to do the conversion and will also work in a cloud environment.
View 2 Replies
View Related
Feb 10, 2008
Hi,
i was planning to create a database migration tool ..
its a certain database of a DMS (document management system) to
another DMS (two different DMS)... from DMS using msde 2000 server .. and tranfer to a DMS using a postgre sql or mssql .. depends ..
they have different table structures and names . . :D
i was thing of what language shall i use.. or what language is the best to work on this kind of project :)
hoping for your kind help guys. thanks :)
br
Frozenice
View 1 Replies
View Related
Oct 23, 2007
can we upgrade a sqlce forgotten password database to sql server for mobile database on our desktop
Thanks & Regards
Mukesh Gupta
View 1 Replies
View Related
Aug 14, 2003
We developed an application . The application is an ADP with MSSQL.
What i need to do if i want to deploy to
users ? Because all the forms - record source belong to my server.
View 1 Replies
View Related
Apr 30, 2007
Hi, what is the best way to go to migrate from access to MSSQL on a remote (hosted) server? do I have to create manually de tables and then move the data? or is there a way to create the creation scripts from the ACCESS database?
Thank you
Diego
View 2 Replies
View Related
Jan 6, 2005
Hey,
Does anyone know how I would go about upgrading a database version to 'C.0.6.43'? I am getting an error and it is telling me to upgrade my database to this version.
Thanks
View 2 Replies
View Related
Mar 15, 2005
We use a program that creates a access database for each of our payperiods. Its a pain to get a full history of a person from each one. I want to setup a way I can combine all of the access files into one table in mssql. I have a DTS I created into a .bas file. My plan is to make the vb.net code get a directory of the files, then run a function (the .bas file) on each directory appending the access table to the mssql table. The struckture of the access files are that each file is in its own directory, like below:
\servernameTAcompany 7-25-04Trans.mdb
\servernameTAcompany 8-08-04Trans.mdb
\servernameTAcompany 8-22-04Trans.mdb
The table is called "Transactions" and they are the same in each mdb file in terms of fields. Every two weeks there is a new directory that is added to the company directory. So I can either dump all and append all, or only append new data and only use the dump/append when there is a problem.
I am just not sure how to do that. Any ideas?
View 3 Replies
View Related
May 24, 2005
Is it possible to install MsSQL / Access on Linux? The reason I am asking is I have a linux virtual dedicated server, and develop both php/mysql and asp/mssql/access database, is there another program or something I can run on my server to allow development of programs needs mssql/access?
Thanks in advance for replies,
Jeff
EDIT: I am new to Linux, however have found this: http://www.knoda.org/ Is this what I might need?
View 2 Replies
View Related
Jun 7, 2006
Hi,
To make a long story short, I'm trying to correlate the most inner query (two levels deep) with the most outer one, and it just doesn't work.
Is it because the correlation must be back-to-back, without any levels that stand before the two?
If you have no idea what I'm talking about, below is the query that does work, but doesn't produce the right results ("QUOTES" gives the same number for all records):
---------------
select printersGlobal.company, (select count(*) from (select subBidding.bid_company from bidding as subBidding where subBidding.bid_company = 'Printing Company 1' group by subBidding.bid_company, subBidding.project) group by subBidding.bid_company) as QUOTES,
count(date_picked) as wins
from printers as printersGlobal
left outer join bidding as biddingGlobal on printersGlobal.company = biddingGlobal.bid_company
group by printersGlobal.company
order by printersGlobal.company asc
----------------------
When I replace 'Printing Company 1' with printersGlobal.company (to correlate and produce dynamic and correct results), I get errors.
I would appreciate if anybody can point me in the right direction.
Thanks.
View 14 Replies
View Related
May 7, 2008
If I am upgrading the SQL Server 2005 32 bit to 64 bit (only DB Server), Do Applications that communicate with Database need to be upgraded to 64 bit as well???
Thanks,
View 1 Replies
View Related
Oct 24, 2005
I run the following statement from an update query in access but I can't find the way to run this same query in MSSQL. Please give me some ideas how to modify and run this in MSSQL.
Thank you
"UPDATE DISTINCTROW ZipToTerr, leadsUS SET leadsUS.Terr = [ZipToTerr]![TerrNum] WHERE ((([ZipToTerr].[BU]='W') AND (([ZipToTerr].[ZipFrom])<=[zip]) And (([ZipToTerr].[ZipTo])>=[zip])) And (([leadsUS].[terr]) = 1 ));"
View 8 Replies
View Related
Oct 31, 2007
Hi im new to SSIS even i did some basice things in SSIS. Now i run in to the problem, I hawe a access file with arount one milion records and i won to transfare this records in Ms SqlServer . But befora i transfare that i nead to check if that record exsist by ID if exsist i must do update else i must do insert.
Can some one Help me how can i do it..
THX
Sorry for my bad englisht
View 3 Replies
View Related
Mar 5, 2008
hi experts,
i have a postcode database that i need to update. the database cnotains of 6tables, the file i ahev has all the information at once, so i have to organize it and insert records into the appropriate tables.
this is the first time i'm doign this so i would like to know what the best way to do? do i need to create a stored procedure or a script, or may be something special and efficient that i do not know yet.
any advise will be very appreciated
thanks in advance
View 1 Replies
View Related
Apr 27, 2007
I have a WinXP Pro sp2 system that I have installed SQL Express in one case and in another caes I have installed SQL Express sp1. When trying to upgrade either to the next service pack, I get a "Setup Failed" on the "SQL Server Database Services". When I look at the log file, the following is the error:
...
MSI (s) (F8!28) [14:43:23:980]: PROPERTY CHANGE: Adding EditionTypechecksum.CC1A8C58_27D1_4D38_BF1B_C0A5CBB90616 property. Its value is 'Express Edition with Advanced Services'.
<Func Name='GetSkuIt'>
GetServiceUserGroup failed for SQLEXPRESS, 5
Error Code: 0x80070534 (1332)
Windows Error Text: No mapping between account names and security IDs was done.
Source File Name: sqlcasqlcax.cpp
Compiler Timestamp: Fri Feb 9 22:35:05 2007
Function Name: SetInstanceProperty
Source Line Number: 1223
Error Code: 1332
MSI (s) (F8!28) [14:43:27:235]: Product: Microsoft SQL Server 2005 -- Error 29528. The setup has encountered an unexpected error while Setting Internal Properties. The error is: Fatal error during installation.
Error 29528. The setup has encountered an unexpected error while Setting Internal Properties. The error is: Fatal error during installation.
<EndFunc Name='LaunchFunction' Return='1332' GetLastError='203'>...
I was hoping someone has run into this before and can direct me to the solution.
Thank you.
KSLarson
View 3 Replies
View Related
Mar 8, 2007
hi,
I've modified some of my database tables and in the existing version(ver1.3) of my database and i named the new version as ver1.5.
now when i've detached ver1.3 database and attaching ver 1.5 to server it is taking the .ldf file from the folder ver1.3.(I'm maintaning the each version in a saperate folder)
I want to create an independent .ldf file for ver 1.5 also. i dont want to depend on old version for .ldf file.
Can any one help me regarding this issue....
dpindra@yahoo.com
View 1 Replies
View Related
Jun 19, 2004
Hello,
I am working on a couple fo the ASP.NET walkthoughs and I would like to practice with a Database that I created in Access. I realize that I could use the Access DB, but I would like to learn to work with a more industrial strength DB. Is there a method to export to MSSQL server 2000 from Access ?
Regards,
James
View 4 Replies
View Related
Jul 19, 2007
Hi,
I need to access the mssql database which is inbuilt in Mcafee.
through jdbc i'm trying to conenct mssql but its getting the tables from the default database which in Mcafee not from the mssql.
if any one have any idea please let me know to solve this.
Thanks for your help in advance.
Regs
rbkl.
View 1 Replies
View Related
Dec 10, 2007
Have recently migrated an Access database to MSSQL.
The following code worked in Access but fails in MSSQL
<input <%If (CStr(Recordset1.Fields.Item("Disclose").Value) = CStr("TRUE")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="Disclose" value="1">
<input <%If (CStr((Recordset1.Fields.Item("Disclose").Value)) = CStr("FALSE")) Then Response.Write("CHECKED") : Response.Write("")%> name="Disclose" type="radio" value="0" >
In Query Analyzer, when I run SELECT Disclose from TABLE, it returns the number 1.
On an ASP page, when I run Response.Write(Recordset1.Fields.Item("Disclose").Value) it returns TRUE.
Have tried changing the = CStr("TRUE") portion to = 1 but it fails to work either way.
Any ideas?
View 1 Replies
View Related
Oct 15, 2007
Hi All,
I am converting an old MS Access database to MSSQL. While I do get some data into MSSQL, some weird things are happening that are beyond my capabilities.
The database I am trying to convert exists of several tables. The first few are converted perfectly, but one of the last is giving difficulties. What I do is:
SET @SQLQuery = 'INSERT INTO TableName ( ' +
'[field1], ' +
'[field2], ' +
'[field3], ' +
'[field4], ' +
'[Date], ' +
'[field6]) ' +
'SELECT ' +
'[field1], ' +
'[field2], ' +
'[field3], ' +
'[field4], ' +
'[Date], ' +
'[field6]) ' +
' FROM '+ RTRIM(@LinkedServerName) +'...TableName'
EXEC (@SQLQuery)
I do the same for each table, all with their own TableNames and field names. 80% of the tables have a date field, which is of type DBTYPE_DBTIMESTAMP in Access and datetime in MSSQL.
As mentioned: the first tables are converted perfectly, however one fails with error message:
Msg 8114, Level 16, State 8, Server XXXXXX, Line 1
Error converting data type DBTYPE_DBTIMESTAMP to datetime.
If I leave the date field out of the query for that table, it all works (obviously, with an empty date column). The weird thing is that most of the other tables have a date column as well, they are the same data types as in this column and the conversion query is very similar as well.
I have Googled on the full error message and on DBTYPE_DBTIMESTAMP alone, but all results I get seem different to what I have. I have tried using convert to put the date in the correct format (format in the date tables is DD-MM-YYYY), but this doesn't help. Would have been funny if it had helped, as all other tables use the same date format, and according to the specs, DBTYPE_DBTIMESTAMP should be automatically converted to datetime anyway (which in all other tables works)...
Basically, what I am saying is: I have 8 extremely similar tables, which I all try to convert using the exact same method, 7 tables succeed and one fails...
Thanks in advance for your help!
Freddy
View 3 Replies
View Related
Apr 5, 2006
Hi,
I have few SQL user who has permissions on different databases. When they are accessing MSSQL server from Enterprise Manager they can see all Databases but can not access them and they can change file size allocated to them. I want to restrict this and they can only see database belongs to respective user and restrict user to change allocated size. Please help me with this as I am not able to find the solution.
Thanks & Regards,
Gaurav
View 1 Replies
View Related
Apr 18, 2002
I upgraded from 6.5 to 7.0 SP3. Now when I save (write) an invoice it takes about 10-12 seconds, at 6.5 it was 1-3 seconds. SQL Server and my Materials App are the only thing running on this box. This is the only area that has gotten slower everything else works great. I have 3 users saving invoices and about 15 people total using the system at one time. It's a compaq DL580 loaded with memory, database is 2,195MB in size. Same 6.5 client to access system as before. Should I rebuild/reindex the database? Is there something from the old 6.5 version I need to remove?? Thanks in advance!!!
View 1 Replies
View Related
Apr 17, 2007
I have one 32-bit SQL 2000 server that is our enterprise-wide reporting server (we'll call it RS) and another 32-bit SQL 2000 server that serves as a stored proc data source for certain reports on that server (we'll call it DS). I am about to go through an upgrade/migration of DS to 64-bit SQL 2005 and was wondering if:
it is possible to just change the data source location on RS and point the old reports against the new DS server?
there are any necessary steps to take within RS to make the data source (DS reference on RS) compatible with the destination (report on RS)?
it is possible/easy to bulk-migrate all the RDL's for a particular data source from RS to DS?
Does anyone know any of the answers to these questions?
Thanks in advance!
View 1 Replies
View Related
May 29, 2007
My question is two fold:
We have a database 65 GB in size and has grown over 12 years.
1) How can I upgrade to 2005 without downtime?
2) Our upgrades on SQL 2000 now can take upwards of 10 hours to add just a column and rebuild index tables?
Any way we can speed this up without detaching the database and going offline?
thanks,
Larry Sitka
View 6 Replies
View Related
Aug 3, 2015
I just upgraded from Windows 7 to Windows 10, and now I can't connect to SQL Server 2008 R2 nor 2014 Express. The logs on both say it can't open master.mdf because it was originally formatted with a sector size 4096 but now it's 3072. But no sector sizes were changed. The only thing that changed was going from Windows 7 (64-bit) to Windows 10 (64-bit). How can this be resolved?
View 10 Replies
View Related
Mar 6, 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 2 Replies
View Related
Jan 30, 2007
I dont know how to arrange situation when application enduser needs to access data in two databases of mssql server concurently in those circumstances that access rights to the data should be restricted by password protected role (whose password is not known to the end user).
Detailed description of problem:
So far there was an application, that manipulated its data, saved in mssql server's database. End user authenticates to application by his (mssql server's) login name and password. The application authenticates the user by connecting to the database with the given name/password credentials, and then the application sets application role with hardcoded name/password. Thus application role sets the access rights for consequent end user's requests, delivered via application to the database server.
The goal is that end user cannot manipulate application database data when connects to the database by other means (e. g. via SQL server Manager), because he does not know the application role's password.
Now suppose that there are two applications (A1, A2), both using the same model for access restrictions. Each of them has its own database (A1DB, A2DB) and its own application role (A1R residing in A1DB, A2R residing in A2DB). End user (login) X can manipulate A1DB data when connects via A1, and A2DB data when connects via A2, and NO data when connects by other means.
Finally suppose that some subset of A2 data (let's say one table) is useful to see also via A1 application. There is no problem to add to A1DB view, that shows data from A2DB table together with A1DB tables. But when the user is connected via A1, he cannot see the data, because query on A1 view fails (user has not access rights on A2 data).
The access rights for A1 enduser cannot be set by no means i know because:
1) I cannot set the rights via public (guest) access because in that case they will be accessible to any users connected by any third party products, which is supposed to be security hole.
2) I cannot set the rights via dbuser or dbrole privileges, because they will not work when connected via A1 application (setting the app role suppresses the db privileges)
3) I cannot set the rights via application role because two application roles cannot be set concurrently.
4) I cannot abandon using application roles mechanism and use database roles mechanism, because db roles cannot be protected by independent password (not known to the enduser).
Please can anybody review my problem and either find the mistake in my approach, or propose other solution? So far I suppose the problem is my ignorance, because I am not great mssql expert.
View 3 Replies
View Related