473,385 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

CDO And MS Access

Hi, Right know im teaching myself a little about CDONTS . But know I want to
sent data form a database with a form.

I wou ld like to do the following:
- I have made a page with set of records.
- If you click on one of the records for more details you will go to a page
with details.
- Then when you like the details and you think that someone else would like
to see them to you will do the following: add your name, your emailaddress
and some comment.(see code below) In the form there are some hidden fields,
with the neccesary data from the database.

The problem is that when i sent the form, with CDONTS, you will not see the
hidden fields but only the other field which you see on the page.

Please help! :(
Thanx for your time!

bellow the code: ( 2 pages)
================================================== ==
The page with the form:
================================================== ==

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../../Connections/wonen.asp" -->
<%
Dim ContactEig__MMColParam
ContactEig__MMColParam = "1"
If (Request.QueryString("WoningID") <> "") Then
ContactEig__MMColParam = Request.QueryString("WoningID")
End If
%>
<%
Dim ContactEig
Dim ContactEig_numRows

Set ContactEig = Server.CreateObject("ADODB.Recordset")
ContactEig.ActiveConnection = MM_wonen_STRING
ContactEig.Source = "SELECT WoningID, WPlaats, WStraat, WNummer, WPostcodeC,
WPostcodeL, WVraagP, WContactMail FROM Omschrijving WHERE WoningID = " +
Replace(ContactEig__MMColParam, "'", "''") + ""
ContactEig.CursorType = 0
ContactEig.CursorLocation = 2
ContactEig.LockType = 1
ContactEig.Open()

ContactEig_numRows = 0
%>
<html><!-- InstanceBegin template="/Templates/221003.dwt.asp"
codeOutsideHTMLIsLocked="false" -->
<head>

<!-- InstanceBeginEditable name="doctitle" -->

<title>Woningen gratis plaatsen - koopwoningen, huizen, koopwoningen,
onroerend goed</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../cssstyle/woningen.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
</head>
<body>
<table width="750" height="400" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td valign="top">
<table width="100%" height="100%" border="0" cellpadding="2"
cellspacing="0">
<tr>
<td height="50" valign="top"><img
src="../../images/site/topwoningen.gif" width="750" height="50"></td>
</tr>
<tr>
<td height="1" valign="top" class="lineh"><img
src="../../images/trans.gif" width="100%" height="1"></td>
</tr>
<tr>
<td height="10" valign="top" span class="tekst"> <table
width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!--#include file="../../inc/menu.inc.asp" -->
</td>
<td width="15%">
<div align="center"><a href="../contact.asp"><img
src="../../images/icons/mail.gif" alt="Neem contact op" width="16"
height="16" border="0"></a>&nbsp;<a href="#" onClick="window.print();return
false"><img src="../../images/icons/printer.gif" alt="Print" width="20"
height="20" border="0"></a></div></td>
</tr>
</table>

</td>
</tr>
<tr>
<td height="1" valign="top" class="lineh"><img
src="../../images/trans.gif"></td>
</tr>
<tr>
<td height="10" valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top" class="tekst"><!-- InstanceBeginEditable
name="Tekst" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" valign="top" class="tekst">Hier kunt u een
reactie
geven op de betreffende woning. </td>
</tr>
<tr>
<td colspan="2" valign="top">&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="top">
<form name="form1" method="GET" action="ConEigWon_Send.asp">
<table width="100%" border="0" cellspacing="0"
cellpadding="2">
<tr>
<td class="tekst">Wat is uw naam? (incl.
achternaam)</td>
<td class="tekst">&nbsp;</td>
</tr>
<tr>
<td class="tekst"><input name="varNaam" type="text"
class="tekst" id="varNaam" size="32" maxlength="200"></td>
<td class="tekst">&nbsp;</td>
</tr>
<tr>
<td width="28%" class="tekst">Wat is uw
emailadres?</td>
<td width="72%" class="tekst">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><input name="varEmailFrom"
type="text" class="tekst" id="varEmailFrom" size="32" maxlength="200">
</td>
</tr>
<tr>
<td class="tekst">Uw reactie op deze woning</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"> <textarea name="varReactieWoning"
cols="35" rows="5" wrap="VIRTUAL" class="tekst"></textarea></td>
</tr>
<tr>
<td>

<input type="hidden" value="<%=(ContactEig.Fields.Item("WoningID").Valu e)%>"
name="varWoningID">
<input type="hidden"
value="<%=(ContactEig.Fields.Item("WContactMail"). Value)%>"
name="varContactEmail">
<input type="hidden" value="<%=(ContactEig.Fields.Item("WStraat").Value )%>"
name="varStraat">
<input type="hidden" value="<%=(ContactEig.Fields.Item("WNummer").Value )%>"
name="varNr">
<input type="hidden"
value="<%=(ContactEig.Fields.Item("WPostcodeC").Va lue)%>"
name="varPostcodeC">
<input type="hidden"
value="<%=(ContactEig.Fields.Item("WPostcodeL").Va lue)%>"
name="varPostcodeL">
<input type="hidden" value="<%=(ContactEig.Fields.Item("WPlaats").Value )%>"
name="varPlaats">
<input type="hidden" value="<%=(ContactEig.Fields.Item("WVraagP").Value )%>"
name="VarPrijs">
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type='submit' class="knop"
value="Verzenden"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="1" valign="top" class="lineh"><img
src="../../images/trans.gif" width="100%" height="1"></td>
</tr>
<tr>

<td height="20" valign="top" class="tekst"> <img
src="../../images/icoon.gif" hspace="2" vspace="2" align="absmiddle">
2003 <a >Meer info</a></td>
</tr>
</table>
</td>
</tr>

</table>
</body>
<!-- InstanceEnd --></html>
<%
ContactEig.Close()
Set ContactEig = Nothing
%>

================================================== ==
The page that will send the email:
================================================== ==
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<html><!-- InstanceBegin template="/Templates/221003.dwt.asp"
codeOutsideHTMLIsLocked="false" -->
<head>

<!-- InstanceBeginEditable name="doctitle" -->

<title>Woningen gratis plaatsen - koopwoningen, huizen, koopwoningen,
onroerend goed</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../cssstyle/woningen.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" -->

<!-- InstanceEndEditable -->
</head>
<body>
<table width="750" height="400" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td valign="top">
<table width="100%" height="100%" border="0" cellpadding="2"
cellspacing="0">
<tr>
<td height="50" valign="top"><img
src="../../images/site/topwoningen.gif" width="750" height="50"></td>
</tr>
<tr>
<td height="1" valign="top" class="lineh"><img
src="../../images/trans.gif" width="100%" height="1"></td>
</tr>
<tr>
<td height="10" valign="top" span class="tekst"> <table
width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!--#include file="../../inc/menu.inc.asp" -->
</td>
<td width="15%">
<div align="center"><a href="../contact.asp"><img
src="../../images/icons/mail.gif" alt="Neem contact op" width="16"
height="16" border="0"></a>&nbsp;<a href="#" onClick="window.print();return
false"><img src="../../images/icons/printer.gif" alt="Print" width="20"
height="20" border="0"></a></div></td>
</tr>
</table>

</td>
</tr>
<tr>
<td height="1" valign="top" class="lineh"><img
src="../../images/trans.gif"></td>
</tr>
<tr>
<td height="10" valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top" class="tekst"><!-- InstanceBeginEditable
name="Tekst" -->
<%
' Begin CDO mail
Dim Naam
Dim MailVan
Dim Reactie
Dim MailAan
Dim WoningId
Dim StraatNaam
Dim StraatNr
Dim WPostcodeC
Dim WPostcodeL
Dim WPlaats
Dim VarPrijs

Dim objCDO
'formulierwaarden ophalen
Naam = Request.QueryString("varNaam") 'naam infovrager
MailVan = Request.QueryString("varEmailFrom") 'emailadres van infovrager
Reactie = Request.QueryString("varReactieWoning") 'reactie van de
infoaanvrager

MailAan = Request.QueryString("WContactMail") 'emailadres van
infoverlener
WoningId = Request.QueryString("WoningID") 'woningid van infoverlener
StraatNaam = Request.QueryString("WStraat") 'straatnaam object
StraatNr = Request.QueryString("WNummer") 'nr van object
PostcodeC = Request.QueryString("WPostcodeC") 'postcodecijfer van object
PostcodeL = Request.QueryString("WPostcodeL") 'postcodeletter van object
Plaats = Request.QueryString("WPlaats") 'plaats van object
Prijs = Request.QueryString("WVraagP") 'prijs van object
Set objCDO = Server.CreateObject("CDONTS.NewMail")

objCDO.From = MailVan

objCDO.To = MailAan

' objCDO.Cc = ""

objCDO.Bcc = "a.*********@planet.nl"

objCDO.Subject = "Reactie op uw huis geplaats op
www.gratishuisplaatsen.nl"

'FORMULIER WAARDEN IN DE MAIL ZETTEN
objCDO.Body = "De volgende persoon vraagt meer informatie aan m.b.t. uw
object:" & vbCrLf & "Naam van informatieaanvrager: " & Naam & vbCrLf &
"Emailadres van de aanvrager: " & MailVan & vbCrLf & "De vraag is: " &
Reactie & vbCrLf & "Het gaat om de volgende woning: " & vbCrLf &
"Straatnaam: " & StraatNaam & " nr:" & StraatNr & vbCrLf & "Postcode: " &
PostcodeC & PostcodeL & vbCrLf & "Plaatsnaam: " & Plaats & vbCrLf &
"Vraagprijs: " & Prijs & vbCrLf & vbCrLf & vbCrLf & "De woning kunt u
bekijken op:" & vbCrLf &
"http://62.131.125.218/woningen/content/Detail.asp?WoningID=" & WoningID &
vbCrLf & vbCrLf & vbCrLf & "(kopieer en plak eventueel deze url in de
browser om naar de betreffende pagina te gaan)"

objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send

' Einde CDO mail
%>

<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="tekstVet">Uw email is verzonden</td>
</tr>
<tr>
<td class="tekst">.</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>

</td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="1" valign="top" class="lineh"><img
src="../../images/trans.gif" width="100%" height="1"></td>
</tr>
<tr>

<td height="20" valign="top" class="tekst"> <img
src="../../images/icoon.gif" hspace="2" vspace="2" align="absmiddle">
2003 <a href="mailto:a.*********@planet.nl">Meer info</a></td>
</tr>
</table>
</td>
</tr>

</table>
</body>
<!-- InstanceEnd --></html>

Jul 19 '05 #1
0 1743

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...
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...
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. ...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
37
by: jasmith | last post by:
How will Access fair in a year? Two years? .... The new version of Access seems to service non programmers as a wizard interface to quickly create databases via a fancy wizard. Furthermore, why...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.