Hello, I am new to this forum but have read several posts and I thank you for your great assistance. I am stumped right now. I have a user registration form in asp that is set to a form method=registra tion.asp page. i will post my registration.as p page below.
I am hoping this asp page will connect to my access database called registration.md b with a table called registration. however, everytime i submit my registration information, I get an error page that says there is a programming error. I have the SAMS teach yourself ASP 3.0 book and have followed this but am having no luck. Does anyone know why this isn't working. The current page I have listed below is trying to use the dsn-less connection. I also tried the dsn connection but failed there too. Any help would be greatly appreciated. Thanks in advance - Jerry
_______________ _______________ _______________ _______________ ___ - <%@ Language=VBScript %>
-
<% Option Explicit %>
-
<!--#include virtual="/adovbs.inc"-->
-
<html>
-
<body>
-
<%
-
Dim objConn
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)};" & _
-
"DBQ=C:\Documents and Settings\MM\Desktop\Website\registration.mdb"
-
objConn.Open
-
-
Dim objRS, bolAlreadyExists
-
If ((Request.Form("firstname") = "") OR (Request.Form("lastname") = "") _
-
OR (Request.Form("street") = "") OR (Request.Form("city") = "") _
-
OR (Request.Form("state") = "") OR (Request.Form("zipcode") = "") _
-
OR (Request.Form("birthdate") = "") oR (Request.Form("email") = "") _
-
OR (Request.Form("confirmemail") = "") oR (Request.Form("password") = "") _
-
OR (Request.Form("confirmpassword") = "") oR (Request.Form("question") = "") _
-
OR (Request.Form("answer") = "") oR (Request.Form("confirmanswer") = "") _
-
OR (Request.Form("interest") = "") oR (Request.Form("nonewsemail") = "") _
-
OR (Request.Form("hearabout") = "")
-
-
Response.Write "<a href='registration.html'>"
-
Response.Write "You must enter values for all the fields."
-
Response.Write "</a>"
-
Else
-
bolAlreadyExists = False
-
Set objRS = Server.CreateObject("ADODB.Recordset")
-
objRS.Open "registration", objConn, , adLockOptimistic, adCmdTable
-
Do While Not (objRS.EOF OR bolAlreadyExists)
-
If (StrComp(objRS("email"), Request.Form("email"), _
-
vbTextCompare) = 0) Then
-
Response.Write "<a href='registration.html'>"
-
Response.Write "Email address already found in table."
-
Response.Write "</a>
-
bolAlreadyExists = True
-
End If
-
objRS.MoveNext
-
Loop
-
If Not bolAlreadyExists Then
-
-
objRS.AddNew
-
-
objRS("firstname") = Request.Form("firstname")
-
objRS("lastname") = Request.Form("lastname")
-
objRS("street") = Request.Form("street")
-
objRS("city") = Request.Form("city")
-
objRS("state") = Request.Form("state")
-
objRS("zipcode") = Request.Form("zipcode")
-
objRS("birthdate") = Request.Form("birthdate")
-
objRS("email") = Request.Form("email")
-
objRS("confirmemail") = Request.Form("confirmemail")
-
objRS("password") = Request.Form("password")
-
objRS("confirmpassword") = Request.Form("confirmpassword")
-
objRS("question") = Request.Form("question")
-
objRS("answer") = Request.Form("answer")
-
objRS("confirmanswer") = Request.Form("confirmanswer")
-
objRS("awardprogram") = Request.Form("awardprogram")
-
objRS("accountnumber") = Request.Form("accountnumber")
-
objRS("interest") = Request.Form("interest")
-
objRS("nonewsemail") = Request.Form("nonewsemail")
-
objRS("hearabout") = Request.Form("hearabout")
-
objRS.Update
-
Response.Write "Thank you for registering."
-
End If
-
objRS.Close
-
Set objRS = Nothing
-
End If
-
objConn.Close
-
Set objConn = Nothing
-
%>
-
</body>
-
</html>
24 3684
one other question to go with my previous post. i am currently trying to use html/asp/microsoft access. would it be easier to use php/mysql? i have a hosting account at godaddy and they allow both i believe. i have read that php/mysql is easier but i have set everything up in asp/access thus far. just curious because i am new to web design but very facinated by it. my webpage is pretty basic. just a page for users to register, then check their points earned balances and edit their registration info if necessary. if i can figure out how to get their user info into a database, i feel i am almost there.
any guidance to the correct scripting languages would be very beneficial.
thanks in advance - Jerry
Hi Jerry,
Firstly, welcome to Bytes.com! I hope you find the site useful.
Secondly, please don't forget to wrap your code in CODE tags - it makes your posts much easier to read - and please read the Posting Guidelines if you have not done so already.
Could you print the error that you are getting on your page please. Make sure that you have Friendly HTTP Error Messages turned off in your browser options so you can see the actual error that is being returned.
Thanks,
Dr B
Thank you for your quick response Dr. B. Below is the error message I am getting. My connection to the internet is fine so I am not sure what is going on. Any ideas?
_______________ _______________ _______________ _______________ __
Internet Explorer cannot display the webpage
Most likely causes:
You are not connected to the Internet.
The website is encountering problems.
There might be a typing error in the address.
What you can try:
Diagnose Connection Problems
More information
This problem can be caused by a variety of issues, including:
Internet connectivity has been lost.
The website is temporarily unavailable.
The Domain Name Server (DNS) is not reachable.
The Domain Name Server (DNS) does not have a listing for the website's domain.
If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.
For offline users
You can still view subscribed feeds and some recently viewed webpages.
To view subscribed feeds
Click the Favorites Center button , click Feeds, and then click the feed you want to view.
To view recently visited webpages (might not work on all pages)
Click Tools , and then click Work Offline.
Click the Favorites Center button , click History, and then click the page you want to view.
The last post was the error message I received when I tried to submit offline.
When I put my webpages on the ftp client and try to submit, I get the following error message.
_______________ _______________ _______________ _____________
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/registration.as p, line 22
OR (Request.Form(" hearabout") = "")
-----------------------------------^
sorry for multiple posts but I went into my registration.as p page and deleted the
"hearabout" line that caused the problem last time and got the following error message. I really appreciate your help. Thanks again.
_______________ _______________ _______________ ___________
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/registration.as p, line 24
Response.Write "<a href='registrat ion.html'>"
^
The error is obviously that you have a missing parenthesis somewhere but the question is where. Can you print a bit more of the code that comes before this line so I can see what is going on please.
Thanks,
Dr B
i am not sure what code you would like me to post but here is the registration.as p page I have been using. If you would like me to post anything else, please let me know. - <%@ Language=VBScript %>
-
<% Option Explicit %>
-
<!--#include virtual="/adovbs.inc"-->
-
<html>
-
<body>
-
<%
-
Dim objConn
-
Set objConn = Server.CreateObject("ADODB.Connection")
-
objConn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)};" & _
-
"DBQ=C:\Documents and Settings\MM\Desktop\Website\registration.mdb"
-
objConn.Open
-
-
Dim objRS, bolAlreadyExists
-
If ((Request.Form("firstname") = "") OR (Request.Form("lastname") = "") _
-
OR (Request.Form("street") = "") OR (Request.Form("city") = "") _
-
OR (Request.Form("state") = "") OR (Request.Form("zipcode") = "") _
-
OR (Request.Form("birthdate") = "") oR (Request.Form("email") = "") _
-
OR (Request.Form("confirmemail") = "") oR (Request.Form("password") = "") _
-
OR (Request.Form("confirmpassword") = "") oR (Request.Form("question") = "") _
-
OR (Request.Form("answer") = "") oR (Request.Form("confirmanswer") = "") _
-
OR (Request.Form("interest") = "") oR (Request.Form("nonewsemail") = "") _
-
-
-
Response.Write "<a href='registration.html'>"
-
Response.Write "You must enter values for all the fields."
-
Response.Write "</a>"
-
Else
-
bolAlreadyExists = False
-
Set objRS = Server.CreateObject("ADODB.Recordset")
-
objRS.Open "registration", objConn, , adLockOptimistic, adCmdTable
-
Do While Not (objRS.EOF OR bolAlreadyExists)
-
If (StrComp(objRS("email"), Request.Form("email"), _
-
vbTextCompare) = 0) Then
-
Response.Write "<a href='registration.html'>"
-
Response.Write "Email address already found in table."
-
Response.Write "</a>
-
bolAlreadyExists = True
-
End If
-
objRS.MoveNext
-
Loop
-
If Not bolAlreadyExists Then
-
-
objRS.AddNew
-
-
objRS("firstname") = Request.Form("firstname")
-
objRS("lastname") = Request.Form("lastname")
-
objRS("street") = Request.Form("street")
-
objRS("city") = Request.Form("city")
-
objRS("state") = Request.Form("state")
-
objRS("zipcode") = Request.Form("zipcode")
-
objRS("birthdate") = Request.Form("birthdate")
-
objRS("email") = Request.Form("email")
-
objRS("confirmemail") = Request.Form("confirmemail")
-
objRS("password") = Request.Form("password")
-
objRS("confirmpassword") = Request.Form("confirmpassword")
-
objRS("question") = Request.Form("question")
-
objRS("answer") = Request.Form("answer")
-
objRS("confirmanswer") = Request.Form("confirmanswer")
-
objRS("awardprogram") = Request.Form("awardprogram")
-
objRS("accountnumber") = Request.Form("accountnumber")
-
objRS("interest") = Request.Form("interest")
-
objRS("nonewsemail") = Request.Form("nonewsemail")
-
objRS("hearabout") = Request.Form("hearabout")
-
objRS.Update
-
Response.Write "Thank you for registering."
-
End If
-
objRS.Close
-
Set objRS = Nothing
-
End If
-
objConn.Close
-
Set objConn = Nothing
-
%>
-
</body>
-
</html>
Hiya,
I think your problem is that you open a parenthesis here: - If ((Request.Form("firstname") = "") OR (Request.Form("lastname")
But I can't find where it is closed.
thank you for your response.
i added a parentheses at the end of this statement after "nonewsemai l" - Dim objRS, bolAlreadyExists
-
If ((Request.Form("firstname") = "") OR (Request.Form("lastname") = "") _
-
OR (Request.Form("street") = "") OR (Request.Form("city") = "") _
-
OR (Request.Form("state") = "") OR (Request.Form("zipcode") = "") _
-
OR (Request.Form("birthdate") = "") oR (Request.Form("email") = "") _
-
OR (Request.Form("confirmemail") = "") oR (Request.Form("password") = "") _
-
OR (Request.Form("confirmpassword") = "") oR (Request.Form("question") = "") _
-
OR (Request.Form("answer") = "") oR (Request.Form("confirmanswer") = "") _
-
OR (Request.Form("interest") = "") oR (Request.Form("nonewsemail") = "")) Then
-
-
-
Response.Write "<a href='registration.html'>"
-
Response.Write "You must enter values for all the fields."
-
Response.Write "</a>"
after i made the above change, i got the following error code.
_______________ _______________ _______________ _____
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/registration.as p, line 36
Response.Write "</a>
--------------------^
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Pete |
last post by:
Before I get started with the question, does anyone have a (single)
good book recommendation for database design? Not an Access-specific
book, but something geared toward helping me figure out *what the user
wants*. I've had brief formal education about data flow diagramming,
but I'm looking for ... more, now that I'm actually running into...
|
by: Michael Eisner |
last post by:
I have an MS Access 8.0 (Office97) program that has a form called
FO-008 that I need to replace on several users computers in different
locations without me being there doing it manually.
I'm trying to perform the replacement by using an external MS Access
program that contains the replacement form also called FO-008. I need
to keep the...
|
by: RAllsopp |
last post by:
I have a client who would like to have several pictures associated
with one system. I have read about storing only the pathname to save
OLE overhead and have set-up a form for my client to browse/add one
picture at a time to a system. Now he would like to 'view' all of the
thumbnails associated with any system on a single form.
I can...
|
by: motessa |
last post by:
Hello All,
I am new to Access and have been looking for answers to my problem on
the internet and have not found it yet. I hope someone can give me a
hint. Thanks so much.
I have a form (called: myform) in which there is a combo (combo1) and a
button (button1). In properties for combo1, I use "Value List" for Row
Source Type and in Row...
|
by: raj_genius |
last post by:
I hav two queries, whc are as follows:
FIRSTLY:
is it possible to access the controls(by name) of a parent form(MDI)
from its child forms??if yes then how??plzz provide a coded example in
VB if possible..
for example..i hav a menu in the parent form named "Administrator" whic
has an item "mnuLogIn"..now when i click on login..another child...
| |
by: Robertf987 |
last post by:
Well, I think I've described what I want to do in the title here.
In the database, I have two main tables that contain the main data for the database. One for group expenditures, another for application details. I have a query for each of them to copy all the contents of the table into a new table, then delete all the data from the main table....
|
by: RvGrah |
last post by:
I'm completely new to using background threading, though I have
downloaded and run through several samples and understood how they
worked.
My question is:
I have an app whose primary form will almost always lead to the user
opening a certain child window that's fairly resource intensive to
load. Is it possible to load this form in a...
|
by: Sunray |
last post by:
I have a form called the sales form and i have 2 sets of listboxes
So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which are not bound, I select from the bottom set and add to the top set which works fine, but now i decide to remove an item from the top set.
when i...
|
by: Icarus |
last post by:
I have a Access 2000 database that I am opening with Access 2007.
When I open the datbase in Access 2000 or Access 2003, the database
runs as expected.
In Access 2007 my main form opens, a form with multiple tabs and
subforms, the form now takes a "very" long time (more than 10 minutes)
to load.
Has anyone come across this before, and...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |