473,851 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Registration Form - Error ?

I've taken the following code from a developers web site which should allow
a user to register and receive an email message with a link to activate
their account, but when I click the link on my home page to take me to the
'registration.a spx' page, it throws up the following error message and I
can't figure out why.

------------------------------------------------------------------------------
Server Error in '/' Application.

--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'OleDbConnectio n' is not defined.

Source Error:

Line 9: Dim MySQL as string = "Insert into Members (uid, pwd, fullname,
email) " & _
Line 10: "Values (@uid, @pwd, @fullname, @email)"
Line 11: Dim MyConn as New OleDbConnection (strConn)
Line 12: Dim Cmd as New OleDbCommand(My SQL, MyConn)
Line 13: With Cmd.Parameters
Source File: d:\websites\swi n644498\www\mem bers\Registrati on.aspx Line:
11

------------------------------------------------------------------------------

The code is in two pages, the first page I called registration.as px and the
second is called Activation.aspx

registration.as px

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<script language="VB" runat="server">

Sub doInsert(Source as Object, E as EventArgs)
Dim strConn as String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
"Data Source=d:\websi tes\swin644498\ databases\userA ccounts.mdb" & ";"
Dim MySQL as string = "Insert into Members (uid, pwd, fullname, email) " &
_
"Values (@uid, @pwd, @fullname, @email)"
Dim MyConn as New OleDbConnection (strConn)
Dim Cmd as New OleDbCommand(My SQL, MyConn)
With Cmd.Parameters
.Add(New OleDbParameter( "@uid", frmuid.text))
.Add(New OleDbParameter( "@pwd", frmpwd.text))

.Add(New OleDbParameter( "@fullname" , frmfullname.tex t))
.Add(New OleDbParameter( "@email", frmemail.text))
End With
MyConn.Open()
cmd.ExecuteNonQ uery()
MyConn.Close
'Put a label on your page to contain the 'success' response:
label1.text="Th ank you for signing up. An email will be sent to you
shortly." & _
"Your response will be needed from that email to activate your account"
doEmail
End Sub

Sub doEmail(Source as Object, E as EventArgs)
Dim objMail as New MailMessage
objMail.To=txtE mail.text
objMail.FROM="e m***@domain.com "
objMail.SUBJECT ="Congratulatio ns, only one more step to go"
objMail.BODY="T o complete the registration on our site, " & _
"please click on the link below" & vbcrlf & vbcrlf & _
"http://Activation.aspx ?uid=" & txtUID.text
objMail.BodyFor mat = MailFormat.Text
SmtpMail.SmtpSe rver="email.ser ver.com"
SmtpMail.Send(o bjMail)
End Sub

</script>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Registra tion</title>
</head>

<body>

<form Name="form1" runat="server">
<table>
<tr>
<td align="right">u id</td>
<td> <asp:textbox id="frmuid" runat="server" /></td>
</tr>
<tr>
<td align="right">p wd</td>
<td> <asp:textbox id="frmpwd" runat="server" /></td>
</tr>
<tr>
<td align="right">f ullname</td>
<td> <asp:textbox id="frmfullname " runat="server" /></td>
</tr>
<tr>
<td align="right">e mail</td>
<td> <asp:textbox id="frmemail" runat="server" /></td>
</tr>

<td align="right">
<asp:button
id="button1"
onclick="doInse rt"
Text="Submit" runat="server" />
</td>
</tr>
</table>
</form>

</body>

</html>
----------------------------------------------------------------------------------------------------------

Activation.aspx

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<script language="VB" runat="server">
Dim sUID as String
Sub Page_Load(Sourc e as Object, E as EventArgs)
sUID=request.Qu eryString ("uid")
Dim strConn as String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
"Data Source=d:\websi tes\swin644498\ databases\userA ccounts.mdb" & ";"
Dim MySQL as string = "Update Members Set verify='YES' where UID='" & sUID
& "'"
Dim MyConn as New OleDbConnection (strConn)
Dim Cmd as New OleDbCommand(My SQL, MyConn)
MyConn.Open()
cmd.ExecuteNonQ uery()
Label1.text="Th ank you. Your email address has been verified." & _
"You may now use your User ID and PWD to login to the site"
MyConn.Close
End Sub
</script>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Activati on</title>
</head>

<body>

</body>

</html>
--------------------------------------------------------------------------------

Can anyone see anything really obvious with the above code that I may be
overlooking, I followed the instructions to the letter on the developers web
site where I found the example but I just can't seem to get it to work.

The only change I made was to the following line:

Dim strConn as String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
server.mappath( "\userAccounts. mdb") & ";"And I changed this to read:

Dim strConn as String = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
"Data Source=d:\websi tes\swin644498\ databases\userA ccounts.mdb" & ";"

Any help or pointers would be grately appreciated.

Many thanks
Wayne
Jun 27 '06 #1
0 1628

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

Similar topics

4
3045
by: karolina | last post by:
Hi, I am making a small registration form about cars in three steps. The first step is to fill in member data. After filled out the member data hit "next" and enter car information. Hit "next" and upload pictures of the cars which is step 3. I have 2 database tables in mysql "member" and "cars". "member" is used in step 1 and "cars" is used in step 2 and step 3. What is proper design of making this work.
1
2685
by: JaNE | last post by:
Hello, I have made my cms... and is working, but have some, let me say "bugs"... And I don't know all reasons, please allow me slightly longer and most probably confusing post (that "confusing" is mainly becaose of my bad english, and that bad english is also reason why am I learning php that slow...). As first, what is problem: some users after succsesfull registration and login can not see "memeber_menu" and can not activly participate...
0
1742
by: Marcel - IDUG Europe 2005 | last post by:
Dear DB2 user, My name is Marcel Lévy and I'm a member of the IDUG 2005 Europe Conference Planning Committee. ********************************************************************* Mark your calendars and make plans to attend... IDUG 2005 Europe Conference 24-28 October 2005 Estrel Hotel & Convention Center
4
1451
by: Todd Greenwood-Geer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Python-list - I'd like to publish to PyPI. I'm assuming that this is open to anyone. So here's my repro case for trying to register for an account: REPRO:
1
10206
by: delusion7 | last post by:
Trying to create a table and insert records from a webform and I keep getting this message: "Successfully created the registration table. Unable to execute the query. Error code 1050: Table 'registration' already exists" Then after the table is created I re-run the query/webform and I don't receive the error message, but it doesn't update my table? When I go to mySQL it shows the table 'registration' but has no updated...
3
6229
by: satishknight | last post by:
Hi, Can some one tell me how to change the validation sequence for the code pasted below, actually what I want it when any one enters the wrong login information (already registered users) then it has to tell then them its wrong information but currently it takes then to a next page and then tells them its incorrect information. This is tedious as every time they enter wrong they will be redirected to a different page and then they have to...
2
2440
by: nirav11 | last post by:
# include <iostream> # include <fstream> # include <iomanip> # include <cstdlib> // needed for exit () using namespace std; int main() { ifstream inFile; ofstream outFile;
9
4254
by: happyse27 | last post by:
Hi All, In perl script(item b below) where we check if html registration form are filled in properly without blank with the necessary fields, how to prompt users that the field are incomplete or blank and then go back to main page(item a below user registration html page) always, something like goggle or msn login page function... Thanks and Best Rgds, Andrew a) script called from user registration html...
6
1640
mideastgirl
by: mideastgirl | last post by:
YIKES! I am having problems going from mideasthonors.org/addmember.php to either the error page because the form has not been filled out accurately, or to the thank you page!!!! Here is my script, and it just keeps saying that the page cannot be found because it is coming up as www.mideasthonors.org/mideasthonors.org/addmember_db.php! What the heck is going on! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
0
9898
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
9748
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
11020
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
10670
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9506
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7073
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();...
0
5736
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5934
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4143
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.