jeena
05-07-2003, 08:07 AM
i have this system at hand right now,which reports incidents and it goes like this; Person A reports the incident and the report of the incident goes to this other file called file B and the report is saved in file B.Now i want to show the report that Person A has reported, back to person A (meaning that Person A will be able to view what he has reported).How or what do i do to make the report be seen....do i write a whole new code or can i just use a function that can be inserted in file B......or How?????
Can someone give me an idea?????:confused:
Spudhead
05-07-2003, 09:40 AM
Umm.
I think I need to see some code. What is File B? An ASP file? Some sort of spreadsheet, CSV or plain text file? How does the report "go" to file B? Do you mean person A fills in a form, and the form submits to an ASP page that writes the report to another file?
Slightly confused.... post more details and we'll see what we can work out... :)
jeena
05-08-2003, 02:10 AM
this is how it goes.....the report is entered(this form gets the details of the report person and the details of where and how the incident took place and the summary of the incident and the opinion of the report person of the incident that took place:-
After the script above, the script below is executed.The script below accepts and saves the report from the script above, into the server's memory;
<%
'Create a connection to our database using a dsn
Response.Buffer = true
dim cnn,rst
set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=d:\Inetpub\wwwroot\dbireport.mdb;"
sqltext = "SELECT * FROM dbirwardusera,dbirwardusera2,dbirwardusera3"
rst.Open sqltext, cnn, 2, 3
'Server Side form validation to keep our database clean
dim rptperson,designation,dateincident,datereport,status,patientname,mrn,sex,age,location,unit,_
medA,medOtherA,fallA,reasonfall,otherfall,outcomefall,otheroutcomefall,sustainA,description,_
outcomeaccident,abnormalinvolved,otherabnormal,pneinvolved,otherpne,visinvolved,othervis,_
adversestate,adverseresult,equipmentA,otherequ,absenceA,otherabsence,malpos,othermalpos,resultequ,_
miscellaneous,opinion4,suggest4,other4,summary
'grab the form contents.
'use the Replace() function to replace any apostrophe with double
'apostrophes. otherwise you'll get a nasty error message if the
'user types in a value that contains an apostrophe, such as O'Brien.
rptperson=request.Form("rptperson")
designation=request.Form("designation")
dateincident=request.Form("dateincident")
datereport=request.Form("datereport")
status=request.Form("status")
patientname=request.Form("patientname")
mrn=request.Form("mrn")
sex=request.Form("sex")
age=request.Form("age")
location=request.Form("location")
unit=request.Form("unit")
medA=request.Form("medA")
medOtherA=request.Form("medOtherA")
fallA=request.Form("fallA")
reasonfall=request.Form("reasonfall")
otherfall=request.Form("otherfall")
outcomefall=request.Form("outcomefall")
otheroutcomefall=request.Form("otheroutcomefall")
sustainA=request.Form("sustainA")
description=request.Form("description")
outcomeaccident=request.Form("outcomeaccident")
abnormalinvolved=request.Form("abnormalinvolved")
otherabnormal=request.Form("otherabnormal")
pneinvolved=request.Form("pneinvolved")
otherpne=request.Form("otherpne")
visinvolved=request.Form("visinvolved")
othervis=request.Form("othervis")
adversestate=request.Form("adversestate")
adverseresult=request.Form("adverseresult")
equipmentA=request.Form("equipmentA")
otherequ=request.Form("otherequ")
absenceA=request.Form("absenceA")
otherabsence=request.Form("otherabsence")
malpos=request.Form("malpos")
othermalpos=request.Form("othermalpos")
resultequ=request.Form("resultequ")
miscellaneous=request.Form("miscellaneous")
opinion4=request.Form("opinion4")
suggest4=request.Form("suggest4")
other4=request.Form("other4")
summary=request.Form("summary")
'If we pass through validation then store the information in the db
rst.AddNew
'rst("id") = id
rst("rptperson") = rptperson
rst("designation") = designation
rst("dateincident") = dateincident
rst("datereport") = datereport
rst("status") = status
rst("patientname") = patientname
rst("mrn") = mrn
rst("sex") = sex
rst("age") = age
rst("location") = location
rst("unit") = unit
rst("medA") = medA
rst("medOtherA") = medOtherA
rst("fallA") = fallA
rst("reasonfall") = reasonfall
rst("otherfall") = otherfall
rst("outcomefall") = outcomefall
rst("otheroutcomefall") = otheroutcomefall
rst("sustainA")= sustainA
rst("description") = description
rst("outcomeaccident") = outcomeaccident
rst("abnormalinvolved") = abnormalinvolved
rst("otherabnormal") = otherabnormal
rst("pneinvolved") = pneinvolved
rst("otherpne") = otherpne
rst("visinvolved") = visinvolved
rst("othervis") = othervis
rst("adversestate") = adversestate
rst("adverseresult") = adverseresult
rst("equipmentA") = equipmentA
rst("otherequ") = otherequ
rst("absenceA") = absenceA
rst("otherabsence") = otherabsence
rst("malpos") = malpos
rst("othermalpos") = othermalpos
rst("resultequ") = resultequ
rst("miscellaneous") = miscellaneous
rst("opinion4") = opinion4
rst("suggest4") = suggest4
rst("other4") = other4
rst("summary") = summary
rst.update
'Lets redirect the user back to where they came from
Response.Redirect "irwardclinictestcdc.asp"
cnn.Close
%>
<body background="j0143753.gif">
<p> </p>
<p> </p>
<table width="376" border="0" cellspacing="0" cellpadding="3" align="center" height="102">
<tr>
<td height="98">
<div align="center">
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>The
data has been sent to the respective</b></font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Location
Supervisor! </b></font></p>
</div>
</td>
</tr>
<tr>
<td>
<div align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="103" height="24">
<param name="BASE" value=".">
<param name=movie value="button7.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="">
<embed src="button7.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="103" height="24" bgcolor="" base=".">
</embed>
</object> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="103" height="24">
<param name="BASE" value=".">
<param name=movie value="button8.swf">
<param name=quality value=high>
<param name="BGCOLOR" value="">
<embed src="button8.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="103" height="24" bgcolor="" base=".">
</embed>
</object><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" width="103" height="24">
<param name=movie value="button9.swf">
<param name=quality value=high>
<param name="BASE" value=".">
<param name="BGCOLOR" value="">
<embed src="button9.swf" base="." quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="103" height="24" bgcolor="">
</embed>
</object></div>
</td>
</tr>
</table>
<p> </p>
So, what i want to know is that, how do i view the report, that has been sent to the server's memory....
:confused:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.