472,989 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,989 software developers and data experts.

Asp and access database--Long

I have an Access database that I have web enabled using ASP, everything
works fine except for one thing. Let me start by giving a background of
the requirements.
This is an online obituary database for a funeral home, I have 4 ASP
pages; obits.asp (displays records from a table in the DB),
DBInputFormc.ASP (used to input condolences into another table same
db), Condolences.ASP (Displays records from the condolences table in
the DB), and Thankyou.ASP (posts data from the DBInputFormc.asp page to
the condolences table in the DB).
My problem is, I want to be able for the visitors to be able to click
on the deceased name on the obits.asp page and open the
DBInputformc.asp page to leave thier condolences without having to
enter the deceased name on the form. ( i.e. want to pass the deceased
name from obits.asp to DBInputFormc.asp then post it to the db. Also
they should be able to view the condolences for the deceased by
clicking on their name from the obits.asp page. Below is the code for
each page, the live site can be viewed at www.davisfuneral-chapel.com,
any assistance would be appreciated.
(Obits.ASP)
<% Response.Buffer = True %>
<html>
<head>
<title>Davis Funeral Chapel Obituaries</title>
</head>
<body>
<BODY BGCOLOR="white" bgproperties="fixed">
<FONT FACE="Verdana" SIZE=4 COLOR="green">Obituaries</font>
<center>Click <a href="condolences.asp">here</a> to view the guestbook
for all condolences.</center>
<hr color="B54039">
<FONT FACE="Verdana" SIZE="2">
<%
Dim rs
Set rs = Server.CreateObject ("ADODB.Recordset")

rs.Open "deceased", "DSN=condolences.dsn"

While Not rs.EOF
Response.Write "Name: " & rs("firstname") & " " &
rs("lastname") & " " & "<a href=DBInputFormc.asp>Send Condolences</a>"
& "<br>"
Response.Write "Date of Birth: " & rs("DOB") & "<br>"
Response.Write "Date of Death: " & rs("DOD") & "<br>"
Response.Write rs("picture") & "<br>"
Response.Write "Obituary: " & rs("obituary") & "<hr>" & "<br>"

rs.MoveNext
Wend

rs.Close
Set rs = Nothing
%>
</BODY>
</HTML>
(DBInputFormc.asp)

<html>
<head>
<title>Condolences</title>

</head>
<body bgcolor="white">
<center><b><font face="Times New Roman"><b><font size="+2"
color="#009933">Please send your

condolences to the family</font></b></font></center><BR>
<font face="times new roman" size="4"></b>
<center>
Information submitted will be listed on the condolences registry and
given to the family<br>

It will not be used for any other purpose.</i></font><BR>
Please complete all blanks, if you do not have an email address simply
enter

"none"</center><br>
<hr size=2 color="#B54039">
<font face="arial" size="3">
<form method="post" action="thankyou.asp">
<b>From:</B><br>
First Name:<input type="text" name="fname" size="20"><br>
Last Name:<input type="text" name="lname" size="20"><br>
Address:&nbsp&nbsp&nbsp&nbsp<input type="text" name="staddress"

size="45"><br>
City:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp<input
type="text" name="city" size="20"><br>
State:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs p&nbsp<input
type="text"

name="state" size="15"><br>
Zip:&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp& nbsp&nbsp&nbsp&nbsp&nbsp<input
type="text"

name="zip" size="20"><br>
Email:&nbsp &nbsp &nbsp &nbsp &nbsp<input type="text" name="email"

size="25"><br>
Condolences:<TEXTAREA NAME="condolences" ROWS=6
COLS=60></TEXTAREA><br>
<center><input type="submit" value="Submit!"><br><br></b></center>
</font>

</form>
</body>
</html>

(condolences.asp)
<% Response.Buffer = True %>
<html>
<head>
<title>Davis Funeral Chapel Condolences</title>
</head>
<body>
<BODY BGCOLOR="white" bgproperties="fixed">
<FONT FACE="Verdana" SIZE=4 COLOR="green">Condolences</font>
<hr color="B54039">
<FONT FACE="Verdana" SIZE="2">
<%
Dim rs
Set rs = Server.CreateObject ("ADODB.Recordset")

rs.Open "condolences", "DSN=condolences.dsn"

While Not rs.EOF
Response.Write "For the family of: " & rs("firstname") & " "
& rs("lastname") & "<br>"
Response.Write "From: " & rs("fname") & " " & rs("lname") & "<br>"
Response.Write "Address:" & rs("staddress") & "<br>"
Response.Write "" & rs("city") & " " & rs("state") & " " & rs("zip")&
"<br>"
Response.Write "Email: " & rs("email") & "<br>"
Response.Write "Condolences: " & rs("condolences") & "<hr>" & "<br>"

rs.MoveNext
Wend

rs.Close
Set rs = Nothing
%>
</BODY>
</HTML>

(thankyou.asp)
<%@language=vbscript%>
<%option explicit%>
<html>
<head>
<meta http-equiv="refresh" content="5;
URL=http://www.swishercs.com/dfc/obits.asp" target="main">
<title>Condolances</title>
<!--#include file="adovbs.inc"-->
</head>
<body bgcolor="white">
<%
DIM objCN, objRS, objProp
SET objCN = Server.CreateObject("ADODB.Connection")
objCN.ConnectionString = "DSN=condolences.dsn"
objCN.Open
SET objRS = Server.CreateObject ("ADODB.Recordset")
objRS.OPEN "condolences", objCN, adOpenDynamic, adLockOptimistic
objRS.AddNew
objRS("firstname") = Request.Form("firstname")
objRS("lastname") = Request.Form("lastname")
objRS("Fname") = Request.Form("fname")
objRS("lname") = Request.Form("lname")
objRS("email") = Request.Form("email")
objRS("condolences") = Request.Form("condolences")

objRS.Update

%>
<br><br><br>
<center><font face=Times New Roman size="5"><i>Thank you,
<%=objRS("Fname")%>&nbsp;<%=objRS("Lname")%> We will see that the
family gets your condolences</i></font></center>

</body>
</html>

Nov 13 '05 #1
4 1541
Bart Swisher wrote:
the live site can be viewed at www.davisfuneral-chapel.com,


Just when I thought Americans had lost their sense of humour we have a
"live" site for a funeral home with a big clock counting down the hours,
minutes and seconds! .... Thanks for the great laugh!

Is the "dead" site just as much fun?
Nov 13 '05 #2

Lyle Fairfield wrote:
Bart Swisher wrote:
the live site can be viewed at www.davisfuneral-chapel.com,
Just when I thought Americans had lost their sense of humour we have

a "live" site for a funeral home with a big clock counting down the hours, minutes and seconds! .... Thanks for the great laugh!

Is the "dead" site just as much fun?


The clock gives the current time, it is not a countdown. Thanks for
your useful suggestion to my posting.

Nov 13 '05 #3
rkc
Bart Swisher wrote:
I have an Access database that I have web enabled using ASP, everything
works fine except for one thing. Let me start by giving a background of
the requirements. <snip a-lot-o stuff>i.e. want to pass the deceased name from obits.asp to
DBInputFormc.asp then post it to the db.

Without a form you can append the information to the URL.

An outline in minimal aircode would be:

(Obits.ASP)

In vbscript:
dim fName, lName, appendedInfo
fName = rs("firstname")
lName = rs("lastname")
appendedInfo= "FirstName=" & fName & "&LastName=" & lName

In the HTML:
<a href="DBInputFormc.asp?<%=appendedInfo%>">Send Condolences</a>

(DBInputFormc.asp)

In vbscript:

dim fName, lName
if Request.ServerVariables("QUERY_STRING") <> "" then
fName = trim(Request.QueryString("FirstName"))
lName = trim(Request.QueryString("LastName"))
end if

Write fName and lName to the database
Nov 13 '05 #4

rkc wrote:
Bart Swisher wrote:
I have an Access database that I have web enabled using ASP, everything works fine except for one thing. Let me start by giving a background of the requirements.

<snip a-lot-o stuff>
>i.e. want to pass the deceased name from obits.asp to
>DBInputFormc.asp then post it to the db.

Without a form you can append the information to the URL.

An outline in minimal aircode would be:

(Obits.ASP)

In vbscript:
dim fName, lName, appendedInfo
fName = rs("firstname")
lName = rs("lastname")
appendedInfo= "FirstName=" & fName & "&LastName=" & lName

In the HTML:
<a href="DBInputFormc.asp?<%=appendedInfo%>">Send Condolences</a>

(DBInputFormc.asp)

In vbscript:

dim fName, lName
if Request.ServerVariables("QUERY_STRING") <> "" then
fName = trim(Request.QueryString("FirstName"))
lName = trim(Request.QueryString("LastName"))
end if

Write fName and lName to the database


Thank you, I will give it a try
Bart

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

63
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
1
by: Dave | last post by:
Hello NG, Regarding access-declarations and member using-declarations as used to change the access level of an inherited base member... Two things need to be considered when determining an...
13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
20
by: Olav.NET | last post by:
I am a .NET/C++ developer who is supposed to do some work with Access. I do not know much about it except for the DB part. Questions: *1* I am looking for INTENSIVE books to get quickly up to...
47
by: ship | last post by:
Hi We need some advice: We are thinking of upgrading our Access database from Access 2000 to Access 2004. How stable is MS Office 2003? (particularly Access 2003). We are just a small...
64
by: John | last post by:
Hi What future does access have after the release of vs 2005/sql 2005? MS doesn't seem to have done anything major with access lately and presumably hoping that everyone migrates to vs/sql. ...
2
by: eitsubashkumars | last post by:
I have configured remote access VPN with local pool in ASA firewall however im accessing all the resources(my private network such as servers ) through Asa firewall after getting connected the VPN...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.