|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
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
|
|||
|
|||
|
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 !! |
|
#2
|
|||
|
|||
|
What front end language are you using to access MS Access?
|
|
#3
|
|||
|
|||
|
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) |
|
#4
|
|||
|
|||
|
You should try printing out the insert and update statements to verify that they are being constructed as you expect them to be.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > webforms and access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|