Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 3rd, 2007, 12:58 AM
Authorized User
 
Join Date: Feb 2007
Location: Winnipeg, Manitoba, Canada.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Registration Form Help

Hi All!
Now that I got my other problem figured out (thanks dparsons!!!!) I can move on to this problem.
I have set up a registration page on my site, called register.asp where people can fill out a form and become a "member". The information from the form should be sent to a table called CustomerList in my Access database.
This worked great on my testing server (my laptop), but got screwed up when it went to the server. When I view register.asp on the net, I fill out the form, press Submit, then receive this error:
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
/thanks2222.asp, line 18

I think I know what it means: the database is "locked" and can't be updated. The problem: I don't know how to fix that.

Following is the code that I have for this. Please note that I used Dreamweaver to do this. I am now learning that DW is actually crappy at doing this kind of stuff. I have tried to modify the code to work, but don't know if I just made it worse. I should learn how to code by hand.


<%
Dim objConn
Dim dbPath
Dim strSQL
Dim tableName
Dim rscustomers

dbPath="/db/HockeyCards.mdb"
sConnection= "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath(dbPath) & ";"
Set objConn = Server.CreateObject("ADODB.Connection")
Set rscustomers = Server.CreateObject("ADODB.Recordset")
tableName="CustomerList"
strSQL="SELECT * FROM CustomerList"
rscustomers.Open strSQL, sConnection

rscustomers.AddNew
rscustomers ("FirstName") = Request.Form("FirstName")
rscustomers ("LastName") =Request.Form("LastName")
rscustomers ("Uname")=Request.Form("Uname")
rscustomers ("Pass")=Request.Form("Pass")
rscustomers ("Email")=Request.Form("Email")
rscustomers ("PhoneNumber")=Request.Form("PhoneNumber")
rscustomers ("FavoriteNHLPlayer")=Request.Form("FavoriteNHLPla yer")
rscustomers ("BillingAddress")=Request.Form("BillingAddress ")
rscustomers ("BillingCity")=Request.Form("BillingCity")
rscustomers ("BillingProvince")=Request.Form("BillingProvince" )
rscustomers ("BillingPostalCode")=Request.Form("BillingPostalC ode")
rscustomers ("ShippingAddress")=Request.Form("ShippingAddress" )
rscustomers ("ShippingCity")=Request.Form("ShippingCity")
rscustomers ("ShippingProvince")=Request.Form("ShippingProvinc e")
rscustomers ("ShippingPostalCode")=Request.Form("ShippingPosta lCode")
rscustomers ("Newsletter")=Request.Form("Newsletter")
rscustomers.Update

rscustomers.Close
Set rscustomers = Nothing
objConn.Close
Set objConn = Nothing
%>
Any thoughts on how to fix this?

While I have your attention, another question about this:
Should the code for the actual insert to database be on my register2222.asp page, or the thanks2222.asp page?
Any help would be great!!


Now is the only thing that's real.
__________________
Now is the only thing that\'s real.
Reply With Quote
  #2 (permalink)  
Old February 3rd, 2007, 04:44 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

This may be a good moment to promote my Dreamweaver MX 2004 book: http://www.wrox.com/WileyCDA/WroxTit...764555243.html

It explains how to use Dreamweaver, tells you what kind of code it generates, what it does and how to tweak it so it does what you want it to do.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #3 (permalink)  
Old February 3rd, 2007, 11:32 AM
Authorized User
 
Join Date: Feb 2007
Location: Winnipeg, Manitoba, Canada.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar:

Wouldn't you just know it! I actually have your book! And it is a great book! Of course, I left it at work this weekend....
So, in other words, there should be something in there to help me out. I check it out on Monday and get back to you if I have any troubles.
Thanks

Now is the only thing that's real.
Reply With Quote
  #4 (permalink)  
Old February 3rd, 2007, 11:39 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Well, if you have the book, I think you're familiar with TheSoccerSite. In that case, take a look at this article: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=209

It builds on top of TheSoccerSite and shows you how to allow your users to sign up for your site.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #5 (permalink)  
Old February 3rd, 2007, 04:04 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Quote:
quote:Originally posted by Imar
 This may be a good moment to promote my Dreamweaver MX 2004 book: http://www.wrox.com/WileyCDA/WroxTit...764555243.html

It explains how to use Dreamweaver, tells you what kind of code it generates, what it does and how to tweak it so it does what you want it to do.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
shameless self promotion ;]

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Reply With Quote
  #6 (permalink)  
Old February 3rd, 2007, 04:14 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:shameless self promotion ;]
Maybe, but on-topic nonetheless....

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #7 (permalink)  
Old February 5th, 2007, 01:15 PM
Authorized User
 
Join Date: Feb 2007
Location: Winnipeg, Manitoba, Canada.
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
Thanks for showing me that article. It was helpful, but...
As I mentioned earlier, I was able to get the registration form to work on my testing server. It was when I uploaded to my web server that it messed up. I have tried to modify the code to point to the web server database, but get an error. So I want to go back to square one and start my form from the beginning and hope I can fix it.
There is a problem unfortunately: Dreamweaver does not display my connection. My database connection string is called hockeycards. It exists because my site is working, so the connection is there. The problem is that in DreamweaverMX 2004, under the Databases tab, the hockeycards connection is not visible. I try to make this connection again by creating a new one named hockeycards, but receive the error that it already exists.
Do you know how to make it "visible" so I can start this from scratch again?
If I can, I will recreate the form from the start. I began doing this according to your article, but am now stuck as I can not choose the proper connection.
Thanks in advance.

Now is the only thing that's real.
Reply With Quote
  #8 (permalink)  
Old February 5th, 2007, 05:30 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Don't know why you can't see the connection. You could try this:

1. Backup the Connection folders.
2. Delete the Connection folders
3. Recreate the connection.

Do you get the same message again?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in registration form prashant_telkar ASP.NET 1.x and 2.0 Application Design 5 July 11th, 2007 01:09 AM
problem with trigger in registration form prashant_telkar SQL Server 2000 2 July 9th, 2007 06:52 PM
Multiple registration ok??? TheMole BOOK: ASP.NET Website Programming Problem-Design-Solution 7 July 31st, 2005 04:26 PM
Registration database jacob C# 2 January 22nd, 2004 01:25 PM



All times are GMT -4. The time now is 04:37 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.