473,545 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.AS P (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.as p 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.as p 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.as p 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="f ixed">
<FONT FACE="Verdana" SIZE=4 COLOR="green">O bituaries</font>
<center>Click <a href="condolenc es.asp">here</a> to view the guestbook
for all condolences.</center>
<hr color="B54039">
<FONT FACE="Verdana" SIZE="2">
<%
Dim rs
Set rs = Server.CreateOb ject ("ADODB.Records et")

rs.Open "deceased", "DSN=condolence s.dsn"

While Not rs.EOF
Response.Write "Name: " & rs("firstname" ) & " " &
rs("lastname") & " " & "<a href=DBInputFor mc.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.a sp)

<html>
<head>
<title>Condolen ces</title>

</head>
<body bgcolor="white" >
<center><b><fon t 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="thankyo u.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&n bsp&nbsp&nbsp<i nput 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&nbs p&nbsp&nbsp&nbs p&nbsp&nbsp&nbs p&nbsp&nbsp<inp ut
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:<TE XTAREA NAME="condolenc es" ROWS=6
COLS=60></TEXTAREA><br>
<center><inpu t type="submit" value="Submit!" ><br><br></b></center>
</font>

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

(condolences.as p)
<% Response.Buffer = True %>
<html>
<head>
<title>Davis Funeral Chapel Condolences</title>
</head>
<body>
<BODY BGCOLOR="white" bgproperties="f ixed">
<FONT FACE="Verdana" SIZE=4 COLOR="green">C ondolences</font>
<hr color="B54039">
<FONT FACE="Verdana" SIZE="2">
<%
Dim rs
Set rs = Server.CreateOb ject ("ADODB.Records et")

rs.Open "condolence s", "DSN=condolence s.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 "Condolence s: " & rs("condolences ") & "<hr>" & "<br>"

rs.MoveNext
Wend

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

(thankyou.asp)
<%@language=vbs cript%>
<%option explicit%>
<html>
<head>
<meta http-equiv="refresh" content="5;
URL=http://www.swishercs.c om/dfc/obits.asp" target="main">
<title>Condolan ces</title>
<!--#include file="adovbs.in c"-->
</head>
<body bgcolor="white" >
<%
DIM objCN, objRS, objProp
SET objCN = Server.CreateOb ject("ADODB.Con nection")
objCN.Connectio nString = "DSN=condolence s.dsn"
objCN.Open
SET objRS = Server.CreateOb ject ("ADODB.Records et")
objRS.OPEN "condolence s", objCN, adOpenDynamic, adLockOptimisti c
objRS.AddNew
objRS("firstnam e") = Request.Form("f irstname")
objRS("lastname ") = Request.Form("l astname")
objRS("Fname") = Request.Form("f name")
objRS("lname") = Request.Form("l name")
objRS("email") = Request.Form("e mail")
objRS("condolen ces") = Request.Form("c ondolences")

objRS.Update

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

</body>
</html>

Nov 13 '05 #1
4 1557
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.a sp 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="DBInputFo rmc.asp?<%=appe ndedInfo%>">Sen d Condolences</a>

(DBInputFormc.a sp)

In vbscript:

dim fName, lName
if Request.ServerV ariables("QUERY _STRING") <> "" then
fName = trim(Request.Qu eryString("Firs tName"))
lName = trim(Request.Qu eryString("Last Name"))
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.a sp 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="DBInputFo rmc.asp?<%=appe ndedInfo%>">Sen d Condolences</a>

(DBInputFormc.a sp)

In vbscript:

dim fName, lName
if Request.ServerV ariables("QUERY _STRING") <> "" then
fName = trim(Request.Qu eryString("Firs tName"))
lName = trim(Request.Qu eryString("Last Name"))
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
5837
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 in Visual Studio to create reports and labels as it's in Access?` The advantage of VS.net is that not every user needs Access, right? And that...
13
2903
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. I believe a dotNet solution is better, but I'm trying to be as convincing as possible -- and maybe I'm wrong! I would appreciate any input or...
1
4325
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 inherited base member's access level in the derived class: its access level in the base class and the type of inheritance (public, protected, or...
13
13319
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 and disadvantages of both programs. Many Thanks Simon
0
2951
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 nor tutorial, "Access Cookbook, Second Edition" (O'Reilly, US $49.95), by Ken Getz, Paul Litwin, and Andy Baron, delivers hundreds of practical...
49
14286
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 application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. ...
20
3298
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 speed. I like books with practical exercises, and also with test questions (like cert books) *2*
47
4485
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 company and this is a big decision for us(!) It's not just the money it's committing to an new version of Access!
64
5159
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. Any comments? Thanks
2
3035
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 but i cant the mailing server through web mail(ports like 80).Please check the configs PuTTY log 2010.10.13 13:11:53 User Access...
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7934
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7446
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7778
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6003
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3459
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.