SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old July 21st, 2003, 11:37 AM
andibrick andibrick is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 andibrick User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question webforms and access

Hi,
I'm new here and have been working on getting form information from a webpage into a MS Access database. Everything seems to be working properly- no errors on the return page or on the form page and I get the email results but the only thing it enters in the DB is the ID number. Everything else is blank.

It's really frustrating. I'm hoping that someone could shed some light onto what I'm missing. Is there code I need to add to a query? or something that needs to be checked in the database itself that collects the information?

I'm realy lost here and I just can't seem to find the right direction to solving this problem.

Please let me know if I need to post any kind of code that might help.

Thanks !!

Reply With Quote
  #2  
Old July 21st, 2003, 10:21 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
What front end language are you using to access MS Access?

Reply With Quote
  #3  
Old July 22nd, 2003, 08:38 AM
andibrick andibrick is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 andibrick User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ASP Any light you could shed would be wonderful :-)

Here's what I have:

<%

Dim Connect, Query
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "degystreetteam", adlockoptimistic


'*************** Retrieve Form Data *************************'

streetteamid = Request.Form("streetteamid")

Set firstname = Request.Form("firstname")
Set lastname = Request.Form("lastname")
Set phonenumber = Request.Form("phonenumber")
Set address1 = Request.Form("address1")
Set city = Request.Form("city")
Set state = Request.Form("state")
Set zipcode = Request.Form("zipcode")
Set email = Request.Form("email")
Set school = Request.Form("school")
Set age = Request.Form("age")
Set howmanyshows = Request.Form("howmanyshows")
Set majorcity = Request.Form("majorcity")
Set favband1 = Request.Form("favband1")
Set favband2 = Request.Form("favband2")
Set favband3 = Request.Form("favband3")
Set favdeggy1 = Request.Form("favdeggy1")
Set favdeggy2 = Request.Form("favdeggy2")
Set favdeggy3 = Request.Form("favdeggy3")
Set favvenue1 = Request.Form("favvenue1")
Set favvenue2 = Request.Form("favvenue2")
Set favvenue3 = Request.Form("favvenue3")
Set favgenre = Request.Form("favgenre")
Set birthday = Request.Form("birthday")

'**************** Fix for Apostrophie ***********************'

firstname = Replace(firstname, "'", "'")
lastname = Replace(lastname, "'", "'")
phonenumber = Replace(phonenumber, "'", "'")
address1 = Replace(address1, "'", "'")
city = Replace(city, "'", "'")
state = Replace(state, "'", "'")
zipcode = Replace(zipcode, "'", "'")
email = Replace(email, "'", "'")
school = Replace(school, "'", "'")
age = Replace(age, "'", "'")
howmanyshows = Replace(howmanyshows, "'", "'")
majorcity = Replace(majorcity, "'", "'")
favband1 = Replace(favband1, "'", "'")
favband2 = Replace(favband2, "'", "'")
favband3 = Replace(favband3, "'", "'")
favdeggy1 = Replace(favdeggy1, "'", "'")
favdeggy2 = Replace(favdeggy2, "'", "'")
favdeggy3 = Replace(favdeggy3, "'", "'")
favvenue1 = Replace(favvenue1, "'", "'")
favvenue2 = Replace(favvenue2, "'", "'")
favvenue3 = Replace(favvenue3, "'", "'")
favgenre = Replace(favgenre, "'", "'")
birthday = Replace(birthday, "'", "'")

'**************** Update the Database ***********************'

'SQL = "INSERT INTO StreetTeamMembers VALUES ('" _
' & streetteamid & "','" _
' & firstname & "','" _
' & lastname & "','" _
' & phonenumber & "','" _
' & address1 & "','" _
' & city & "','" _
' & state & "','" _
' & zipcode & "','" _
' & email & "','" _
' & school & "','" _
' & age & "','" _
' & howmanyshows & "','" _
' & majorcity & "','" _
' & favband1 & "'," _
' & favband2 & "'," _
' & favband3 & "'," _
' & favdeggy1 & "'," _
' & favdeggy2 & "'," _
' & favdeggy3 & "'," _
' & favvenue1 & "'," _
' & favvenue2 & "'," _
' & favvenue3 & "'," _
' & favgenre & "'," _
' & birthday & "')"
'Set temp = Connect.Execute(SQL)

SQL = "UPDATE StreetTeamMembers SET firstname = '" _
& firstname & "', lastname = '" _
& lastname & "', phonenumber = '" _
& phonenumber & "', address1 = '" _
& address1 & "', city = '" _
& city & "', state = '" _
& state & "', zipcode = '" _
& zipcode & "', email = '" _
& email & "', age = '" _
& age & "', howmanyshows = '" _
& howmanyshows & "', majorcity = '" _
& majorcity & "', favband1 = '" _
& favband1 & "', favband2 = '" _
& favband2 & "', favband3 = '" _
& favband3 & "', favdeggy1 = '" _
& favdeggy1 & "', favdeggy2 = '" _
& favdeggy2 & "', favdeggy3 = '" _
& favdeggy3 & "', favvenue1 = '" _
& favvenue1 & "', favvenue2 = '" _
& favvenue2 & "', favvenue3 = '" _
& favvenue3 & "', favgenre = '" _
& favgenre & "', birthday = '" _
& birthday & "' WHERE streetteamid = " & streetteamid & ""
'Set temp = Connect.Execute(SQL)

Reply With Quote
  #4  
Old July 22nd, 2003, 07:00 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
You should try printing out the insert and update statements to verify that they are being constructed as you expect them to be.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > webforms and access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway