473,597 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="VB SCRIPT" CODEPAGE="1252" %>
<!--#include file="../../Connections/wonen.asp" -->
<%
Dim ContactEig__MMC olParam
ContactEig__MMC olParam = "1"
If (Request.QueryS tring("WoningID ") <> "") Then
ContactEig__MMC olParam = Request.QuerySt ring("WoningID" )
End If
%>
<%
Dim ContactEig
Dim ContactEig_numR ows

Set ContactEig = Server.CreateOb ject("ADODB.Rec ordset")
ContactEig.Acti veConnection = MM_wonen_STRING
ContactEig.Sour ce = "SELECT WoningID, WPlaats, WStraat, WNummer, WPostcodeC,
WPostcodeL, WVraagP, WContactMail FROM Omschrijving WHERE WoningID = " +
Replace(Contact Eig__MMColParam , "'", "''") + ""
ContactEig.Curs orType = 0
ContactEig.Curs orLocation = 2
ContactEig.Lock Type = 1
ContactEig.Open ()

ContactEig_numR ows = 0
%>
<html><!-- InstanceBegin template="/Templates/221003.dwt.asp"
codeOutsideHTML IsLocked="false " -->
<head>

<!-- InstanceBeginEd itable name="doctitle" -->

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

<!-- InstanceEndEdit able -->
</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"><i mg
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"><i mg
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">&n bsp;</td>
</tr>
<tr>
<td valign="top" class="tekst">< !-- InstanceBeginEd itable
name="Tekst" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td colspan="2" valign="top" class="tekst">H ier kunt u een
reactie
geven op de betreffende woning. </td>
</tr>
<tr>
<td colspan="2" valign="top">&n bsp;</td>
</tr>
<tr>
<td colspan="2" valign="top">
<form name="form1" method="GET" action="ConEigW on_Send.asp">
<table width="100%" border="0" cellspacing="0"
cellpadding="2" >
<tr>
<td class="tekst">W at 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">W at is uw
emailadres?</td>
<td width="72%" class="tekst">& nbsp;</td>
</tr>
<tr>
<td colspan="2"><in put name="varEmailF rom"
type="text" class="tekst" id="varEmailFro m" size="32" maxlength="200" >
</td>
</tr>
<tr>
<td class="tekst">U w reactie op deze woning</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"> <textarea name="varReacti eWoning"
cols="35" rows="5" wrap="VIRTUAL" class="tekst"></textarea></td>
</tr>
<tr>
<td>

<input type="hidden" value="<%=(Cont actEig.Fields.I tem("WoningID") .Value)%>"
name="varWoning ID">
<input type="hidden"
value="<%=(Cont actEig.Fields.I tem("WContactMa il").Value)%> "
name="varContac tEmail">
<input type="hidden" value="<%=(Cont actEig.Fields.I tem("WStraat"). Value)%>"
name="varStraat ">
<input type="hidden" value="<%=(Cont actEig.Fields.I tem("WNummer"). Value)%>"
name="varNr">
<input type="hidden"
value="<%=(Cont actEig.Fields.I tem("WPostcodeC ").Value)%> "
name="varPostco deC">
<input type="hidden"
value="<%=(Cont actEig.Fields.I tem("WPostcodeL ").Value)%> "
name="varPostco deL">
<input type="hidden" value="<%=(Cont actEig.Fields.I tem("WPlaats"). Value)%>"
name="varPlaats ">
<input type="hidden" value="<%=(Cont actEig.Fields.I tem("WVraagP"). Value)%>"
name="VarPrijs" >
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type='submit' class="knop"
value="Verzende n"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<!-- InstanceEndEdit able --></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="absmiddl e">
2003 <a >Meer info</a></td>
</tr>
</table>
</td>
</tr>

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

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

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

<!-- InstanceBeginEd itable name="doctitle" -->

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

<!-- InstanceEndEdit able -->
</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"><i mg
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"><i mg
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">&n bsp;</td>
</tr>
<tr>
<td valign="top" class="tekst">< !-- InstanceBeginEd itable
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
'formulierwaard en ophalen
Naam = Request.QuerySt ring("varNaam") 'naam infovrager
MailVan = Request.QuerySt ring("varEmailF rom") 'emailadres van infovrager
Reactie = Request.QuerySt ring("varReacti eWoning") 'reactie van de
infoaanvrager

MailAan = Request.QuerySt ring("WContactM ail") 'emailadres van
infoverlener
WoningId = Request.QuerySt ring("WoningID" ) 'woningid van infoverlener
StraatNaam = Request.QuerySt ring("WStraat") 'straatnaam object
StraatNr = Request.QuerySt ring("WNummer") 'nr van object
PostcodeC = Request.QuerySt ring("WPostcode C") 'postcodecijfer van object
PostcodeL = Request.QuerySt ring("WPostcode L") 'postcodeletter van object
Plaats = Request.QuerySt ring("WPlaats") 'plaats van object
Prijs = Request.QuerySt ring("WVraagP") 'prijs van object
Set objCDO = Server.CreateOb ject("CDONTS.Ne wMail")

objCDO.From = MailVan

objCDO.To = MailAan

' objCDO.Cc = ""

objCDO.Bcc = "a.*********@pl anet.nl"

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

'FORMULIER WAARDEN IN DE MAIL ZETTEN
objCDO.Body = "De volgende persoon vraagt meer informatie aan m.b.t. uw
object:" & vbCrLf & "Naam van informatieaanvr ager: " & 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?Woni ngID=" & WoningID &
vbCrLf & vbCrLf & vbCrLf & "(kopieer en plak eventueel deze url in de
browser om naar de betreffende pagina te gaan)"

objCDO.BodyForm at = 1
objCDO.MailForm at = 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>
<!-- InstanceEndEdit able --></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="absmiddl e">
2003 <a href="mailto:a. *********@plane t.nl">Meer info</a></td>
</tr>
</table>
</td>
</tr>

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

Jul 19 '05 #1
0 1753

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

Similar topics

63
5879
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 would eliminate the Access version problem as well I guess.
13
2923
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 references which could help me.
1
4332
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 private). After this determination is made, the following possibilities exist for manually changing the...
13
13330
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
2957
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 examples, up-to-date suggestions, and handy solutions to real-world problems that Access users and...
20
3314
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*
64
5194
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
1
3329
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. ... www.soft30.com/download-1-11975.htm - 31k - Cached - Similar pages MDBSecure 1.0.8.0 - Soft30.com Utility which makes it easy to create secure MS Access Databases, ... MS Access 2000/2003 format. 30 day money back guarantee, 30 day trial. ...
17
4400
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 there, but is there a way they can find out if that application was put there from a CD or email or created at work? Hint: It's not on a client/server database, just native jet database mdb created on Access 2003 (default 2000)...
37
5202
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 would you even continue to use Access as a backend when you have a much superior option in SQL express? What about as a future front-end development tool? Let's get serious. Microsoft continues to publish numerous articles and videos on how you...
0
7959
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7883
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8263
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8254
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5842
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5421
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2393
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1492
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1226
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.