Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Email form validation with recaptcha

Posted on 2008-06-12
19
Medium Priority
?
617 Views
Last Modified: 2011-10-19
I am trying to get recaptcha to work with ASP.  I have it in my form and am trying to submit it but get this error - Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
  I was thinking that the recaptcha would work as a from checking field but it is doing mor than that.  How to I get it to check that the characters have been entered and also pass my form variables to the database and send the email?

Any help is greatly appraciated,
John
example.txt
0
Comment
Question by:JohnMac328
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
  • 2
19 Comments
 
LVL 8

Expert Comment

by:rweil
ID: 21774691
When I did the recaptcha the verification was done in the page that was called when the form was submitted, very near the top of the code.

i.e.  The call to recaptcha _confirm would be in the Send_to_Friend_submit.asp routine.  Whn it fails I did:

I do not have access to my code right now, but I think it went something like below.

rechallenge = request.form("recaptcha_challenge_field")
reresponse = request.form("recaptcha_response_field")
if (recaptcha_confirm(privkey,,reresponse)
       response.write  "Error  You have incorrectly typed the necessary words." & _
                      " Please click your Back button and try again."
       response.end   
 
end if
 
'  code to send th email

Open in new window

0
 
LVL 15

Expert Comment

by:dosth
ID: 21776471
usally this error " Multiple-step OLE DB operation generated errors" occurs when we try to store more data for a field but the field length was less that the acceptable chars.

can you try and check on that point? also can you tell me the line no it comes?
0
 

Author Comment

by:JohnMac328
ID: 21777848
It is line 55, it should not be trying to insert any data, it is just checking to see if the characters are entered correctly, not storing them.  How about this.  When send to a friend is clicked the recaptcha form comes up, then after they correctly enter the data (it does work as a stand alone page) the send to a friend page comes up and then they enter the emails, will that provide the security step I am after to reduce spamming of the email server?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 15

Expert Comment

by:dosth
ID: 21777920
that works, but you need to added a session check like session("captcha") = true and check that in other page. so if any one come to the page directly it redirects them to captcha page
0
 

Author Comment

by:JohnMac328
ID: 21777946
Thanks dosth, would you have the exact session("captcha") code to do that?
0
 
LVL 15

Expert Comment

by:dosth
ID: 21777965
0
 

Author Comment

by:JohnMac328
ID: 21778153
I am assuming that this example also has to be on a page by itself before getting to the actual process form.  This would also need a session("captcha") type check?  Do you have the syntax for that?
0
 
LVL 15

Expert Comment

by:dosth
ID: 21778181
this page all the code is on the same page, captcha verification done using javascript
0
 

Author Comment

by:JohnMac328
ID: 21778234
I still get Multiple-step OLE DB operation generated errors when I try to have it all in the same form.  
0
 
LVL 15

Expert Comment

by:dosth
ID: 21778276
post all the code
0
 

Author Comment

by:JohnMac328
ID: 21778309
Here it is
example2.txt
0
 

Author Comment

by:JohnMac328
ID: 21778352
It bombs on this line of the send_to_friend_submit.  It should not be trying to pass anything, if I take out the new code the page works.
if txt_Presentation_Name<>"" then RecordSet5.fields("txt_Presentation_Name")=txt_Presentation_Name end if
0
 
LVL 15

Accepted Solution

by:
dosth earned 2000 total points
ID: 21778408
if trim(txt_Presentation_Name) <>"" then RecordSet5.fields("txt_Presentation_Name")=txt_Presentation_Name
end if
0
 

Author Comment

by:JohnMac328
ID: 21778505
If I don't put anything in the box that checks addition, it still passes the form data.  Is there a way to put in form checking?
0
 

Author Comment

by:JohnMac328
ID: 21778700
Here is my submit button

<td colspan="2" align="center" bgcolor="#ffffcc"><script type="text/javascript">DrawBotBoot()</script><input name="Submit" type="submit" id="Submit" onsubmit="return ValidBotBoot();" value="Send Email" /></td>
0
 

Author Closing Comment

by:JohnMac328
ID: 31466745
Wait, got it, many thanks.
0
 
LVL 15

Expert Comment

by:dosth
ID: 21778855
thanks your points make me to put me as Master in this zone, so you will get Many thanks from me
0
 
LVL 8

Expert Comment

by:rweil
ID: 21780781
dosth said: "this page all the code is on the same page, captcha verification done using javascript"

If the captcha is done via javascript on the same page,  there are two minor problems.

1) the page is not secure.  Someone can easily copy the page,  modify it by replacing the check and then do the submission.

2) Some users do not Javascript enabled.
0
 

Author Comment

by:JohnMac328
ID: 21780862
Thanks for your imput rweil, I am going to give this a try and see if it takes care of the issue we are having.  If not, I will be back :)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question