Advertisement

05.16.2006 at 02:56AM PDT, ID: 21851860
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

ASP Feedback Form into Access DB Nightmare!

Asked by ncrones in Active Server Pages (ASP)

Tags: ,

Hi guys
desperately need help on this one have been struggling for weeks now:

Goal: to have a single survey page that submits to an access DB and then throws up a thank you for submitting page.

Environment:  ISP hosted Win2003 Web Server, Access 2003 database (SurveyRdr.mdb) with 1 table (results) in it, 1 basic frontpage form with a reader survey (checkboxes, dropdown menus, radio buttons etc)  

Attempts: have tried numerous methods of getting this to work to no avail:
–         First attempt was to have it submit via email but can’t do it as we host our mail here and not at the ISP
–         second attempt was to let frontpage do it and submit to db from the form – never could get it working (extensions are enabled on the ISP server)
–         third attempt was to put all the code in the one form – kept erroring out
–         fourth attempt was to have the first form submit results to an asp page I wrote that had all the DB connection stuff in it – got this to partially work then no joy

current method:

3 asp pages:
1st Page -  which contains the survey and form set to post to another asp page
2nd Page - contains asp to write to access database (with an include pointing to 3rd page)
3rd Page - contains connection details to database

see code below for each - any help GREATLY APPRECIATED! URGENT AND DIFFICULT (FOR ME ANYWAYS!) 500 POINTS!!!!!!!


folder structure on the ISP web server is:
|
|_   htdocs – asp and html in here
|
|_    private – database in here
|
|_   logfiles – am sure u can guess

-----------------------------
 3rd asp Page Code:
-----------------------------

<%
dim objConn, strsql, rsuser, strMDBPath
    set objConn=server.createobject("ADODB.Connection")
    set rsuser=server.createobject("ADODB.Recordset")
    strMDBpath = Server.MapPath("\fpdb\SurveyRdr.mdb")
    objConn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & "strMDBPath"
%>

-----------------------------
2nd asp page code:
-----------------------------

<% @Language=VBScript%>
<% Option Explicit %>
<%
'include our connection file and adovbs.inc file
%>
<!--#include file="connection.asp"-->
<!--#include file="adovbs.inc"-->
<%
'Declare our variables
Dim WhatwouldyoudoOWTLTXT, FirstNameTXT, EmailTXT, Howdidyouhear, Howdidyouhear_otherTXT, Where_Music, Where_Club0, Where_Cafe, Where_Fashion, Where_Gym0, Where_uni, Where_Lifestyle, Where_Tube0, Where_Club, Where_Bar, Where_Bus0, Where_train0, Where_Other, Where_OtherTXT, Howoftenread, Howlongread, ActivelySeek, PickupDay, MainreasonPickUp, MainreasonPickUp_otherTXT, LikeSections1, LikeSections2, LikeSections3, compshowoften, CompsWhyNot, CompsWhyNot_OtherTXT, thinkofOWTL, SatisfiedOWTL, NoBecauseTXT, finishedreadingOWTL, finishedreadingOWTLTXT, ShareCopyofOWTL, RecommendOWTL, Music_House, Music_Techno, Music_Trance, Music_Reggae, Music_Hard, Music_HipHop, Music_Breaks, Music_JazzFunk, Music_Rave, Music_RnBSoul, Music_Chill, Music_Latin, Music_Electro, Music_Pop, Music_DNB1, Music_Disco, Music_Electronica, Music_Other, Music_OtherTXT, MusicBuy_High, MusicBuy_OnlineAuct, MusicBuy_Sec, MusicBuy_Spec, MusicBuy_Onlinedown, MusicBuy_Mail, MusicBuy_Other, MusicBuy_OtherTXT, Music_Spend, MusicAccess_Vinyl, MusicAccess_MP3, MusicAccess_Cable, MusicAccess_CD, MusicAccess_Online, MusicAccess_Radio, MusicAccess_DVD, MusicAccess_Pod, MusicAccess_TV, MusicAccess_Tape, MusicAccess_Other, MusicAccess_OtherTXT, Musicongodevice_NA, Musicongodevice_MP3, Musicongodevice_Tape, Musicongodevice_Mobile, Musicongodevice_CDdisc, Musicongodevice_PDA, Musicongodevice_Other, Musicongodevice_OtherTXT, DanceRadio, DanceRadioOnline, RadioStns_Kiss, RadioStns_Rad1, RadioStns_Rad1X, RadioStns_Other, RadioStns_OtherTXT, DJon_NA, DJon_Vinyl, DJon_CD, DJon_Lap, DJon_Other, DJon_OtherTXT, ComputerProdRem_NA, ComputerProdRem_MAC, ComputerProdRem_PC, ComputerProdRem_Other, ComputerProdRem_OtherTXT, CableTV, OwnComputerTYPE_NA, OwnComputerTYPE_MAC, OwnComputerTYPE_PC, OwnComputerTYPE_Other, OwnComputerTYPE_OtherTXT, ComputerGames, GamesConsoleTYPE_NA, GamesConsoleTYPE_PS, GamesConsoleTYPE_XBOX, GamesConsoleTYPE_Nintendo, GamesConsoleTYPE_Other, GamesConsoleTYPE_OtherTXT, Internet_NA, Internet_ISDN, Internet_cafe, Internet_Cable, Internet_work, Internet_DSL, Internet_28, Internet_T1, Internet_56, Internet_Dontknow, Peer2PeerUSE, OnlineMusic_LISTEN, OnlineMusic_PURCHASE,  OnlineOther_PURCHASE, Internet_Calls, Fave_LondClubTXT, Fave_LondBarTXT, Fave_AlchoTXT, Fave_NonAlchoTXT, Fave_LondFestTXT, Fave_LondFestTXT, Fave_UKFest, Fave_IntFestTXT, Fave_ClubHilidayTXT, ClubTransport_Bus, ClubTransport_Black, ClubTransport_Walk, ClubTransport_Car, ClubTransport_Tube, ClubTransport_Train, ClubTransport_mini, ClubTransport_Other, ClubTransport_OtherTXT, UnlicensedCabs, Drinks_Beer, Drinks_Spirits, Drinks_Soft, Drinks_Juice, Drinks_Water, Drinks_Alcopops, Drinks_Other, Drinks_OtherTXT, Drinks_BrandsTXT, travelUK, travelOS, travelIbiza, IbizaYes_notimes, IbizaNo_liketogo, Ibiza_thisyr, Airline_BA, Airline_Iberia, Airline_Easy, Airline_BMI, Airline_Ryan, Airline_Luft, Airline_Virgin, Airline_Other, Airline_OtherTXT, Travel_Other_Boat, Travel_Other_Bus, Travel_Other_Train, Travel_Other_Euro, Travel_Other_car, Travel_Other, Travel_OtherTXT, Shopping_city, Shopping_High, Shopping_Onl, Shopping_Oxf, Shopping_Bout, Shopping_Mkts, Shopping_Reg, Shopping_Cov, Shopping_other, Shopping_otherTXT, Clubwear_Spend, DownTime_Pubs, DownTime_Psport, DownTime_cinema, DownTime_Wsport, DownTime_DVD, DownTime_Read, DownTime_theatre, DownTime_Console, DownTime_Music, DownTime_PC, DownTime_gigs, DownTime_Gym, DownTime_Other, DownTime_OtherTXT, AboutYou_Age, Aboutyou_Sex, AboutYou_WhereLive, AboutYou_Zip, AboutYou_Educ, AboutYou_marital, AboutYou_kids, Employment_Status, AboutYou_income, anythingelseTXT, objConn, objRS

'Create our recordset object
Set objRS = Server.CreateObject("ADODB.Recordset")

'Open our recordset and our connection
objRS.Open "results", objConn , adLockOptimistic, adCmdTable

'Assuming no duplicates were found, now we add a new record by calling the AddNew method
objRS.AddNew

'Now we insert the values of our variables into the appropriate fields
objRS(“WhatwouldyoudoOWTLTXT") = WhatwouldyoudoOWTLTXT
objRS(“FirstNameTXT") = FirstNameTXT
objRS(“EmailTXT") = EmailTXT
objRS(“Howdidyouhear") = Howdidyouhear
objRS(“Howdidyouhear_otherTXT") = Howdidyouhear_otherTXT
objRS(“Where_Music") = Where_Music
objRS(“Where_Club0") = Where_Club0
objRS(“Where_Cafe") = Where_Cafe
objRS(“Where_Fashion") = Where_Fashion
objRS(“Where_Gym0") = Where_Gym0
objRS(“Where_uni") = Where_uni
objRS(“Where_Lifestyle") = Where_Lifestyle
objRS(“Where_Tube0") = Where_Tube0
objRS(“Where_Club") = Where_Club
objRS(“Where_Bar") = Where_Bar
objRS(“Where_Bus0") = Where_Bus0
objRS(“Where_train0") = Where_train0
objRS(“Where_Other") = Where_Other
objRS(“Where_OtherTXT") = Where_OtherTXT
objRS(“Howoftenread") = Howoftenread
objRS(“Howlongread") = Howlongread
objRS(“ActivelySeek") = ActivelySeek
objRS(“PickupDay") = PickupDay
objRS(“MainreasonPickUp") = MainreasonPickUp
objRS(“MainreasonPickUp_otherTXT") = MainreasonPickUp_otherTXT
objRS(“LikeSections1") = LikeSections1
objRS(“LikeSections2") = LikeSections2
objRS(“LikeSections3") = LikeSections3
objRS(“compshowoften") = compshowoften
objRS(“CompsWhyNot") = CompsWhyNot
objRS(“CompsWhyNot_OtherTXT") = CompsWhyNot_OtherTXT
objRS(“thinkofOWTL") = thinkofOWTL
objRS(“SatisfiedOWTL") = SatisfiedOWTL
objRS(“NoBecauseTXT") = NoBecauseTXT
objRS(“finishedreadingOWTL") = finishedreadingOWTL
objRS(“finishedreadingOWTLTXT") = finishedreadingOWTLTXT
objRS(“ShareCopyofOWTL") = ShareCopyofOWTL
objRS(“RecommendOWTL") = RecommendOWTL
objRS(“Music_House") = Music_House
objRS(“Music_Techno") = Music_Techno
objRS(“Music_Trance") = Music_Trance
objRS(“Music_Reggae") = Music_Reggae
objRS(“Music_Hard") = Music_Hard
objRS(“Music_HipHop") = Music_HipHop
objRS(“Music_Breaks") = Music_Breaks
objRS(“Music_JazzFunk") = Music_JazzFunk
objRS(“Music_Rave") = Music_Rave
objRS(“Music_RnBSoul") = Music_RnBSoul
objRS(“Music_Chill") = Music_Chill
objRS(“Music_Latin") = Music_Latin
objRS(“Music_Electro") = Music_Electro
objRS(“Music_Pop") = Music_Pop
objRS(“Music_DNB1") = Music_DNB1
objRS(“Music_Disco") = Music_Disco
objRS(“Music_Electronica") = Music_Electronica
objRS(“Music_Other") = Music_Other
objRS(“Music_OtherTXT") = Music_OtherTXT
objRS(“MusicBuy_High") = MusicBuy_High
objRS(“MusicBuy_OnlineAuct") = MusicBuy_OnlineAuct
objRS(“MusicBuy_Sec") = MusicBuy_Sec
objRS(“MusicBuy_Spec") = MusicBuy_Spec
objRS(“MusicBuy_Onlinedown") = MusicBuy_Onlinedown
objRS(“MusicBuy_Mail") = MusicBuy_Mail
objRS(“MusicBuy_Other") = MusicBuy_Other
objRS(“MusicBuy_OtherTXT") = MusicBuy_OtherTXT
objRS(“Music_Spend") = Music_Spend
objRS(“MusicAccess_Vinyl") = MusicAccess_Vinyl
objRS(“MusicAccess_MP3") = MusicAccess_MP3
objRS(“MusicAccess_Cable") = MusicAccess_Cable
objRS(“MusicAccess_CD") = MusicAccess_CD
objRS(“MusicAccess_Online") = MusicAccess_Online
objRS(“MusicAccess_Radio") = MusicAccess_Radio
objRS(“MusicAccess_DVD") = MusicAccess_DVD
objRS(“MusicAccess_Pod") = MusicAccess_Pod
objRS(“MusicAccess_TV") = MusicAccess_TV
objRS(“MusicAccess_Tape") = MusicAccess_Tape
objRS(“MusicAccess_Other") = MusicAccess_Other
objRS(“MusicAccess_OtherTXT") = MusicAccess_OtherTXT
objRS(“Musicongodevice_NA") = Musicongodevice_NA
objRS(“Musicongodevice_MP3") = Musicongodevice_MP3
objRS(“Musicongodevice_Tape") = Musicongodevice_Tape
objRS(“Musicongodevice_Mobile") = Musicongodevice_Mobile
objRS(“Musicongodevice_CDdisc") = Musicongodevice_CDdisc
objRS(“Musicongodevice_PDA") = Musicongodevice_PDA
objRS(“Musicongodevice_Other") = Musicongodevice_Other
objRS(“Musicongodevice_OtherTXT") = Musicongodevice_OtherTXT
objRS(“DanceRadio") = DanceRadio
objRS(“DanceRadioOnline") = DanceRadioOnline
objRS(“RadioStns_Kiss") = RadioStns_Kiss
objRS(“RadioStns_Rad1") = RadioStns_Rad1
objRS(“RadioStns_Rad1X") = RadioStns_Rad1X
objRS(“RadioStns_Other") = RadioStns_Other
objRS(“RadioStns_OtherTXT") = RadioStns_OtherTXT
objRS(“DJon_NA") = DJon_NA
objRS(“DJon_Vinyl") = DJon_Vinyl
objRS(“DJon_CD") = DJon_CD
objRS(“DJon_Lap") = DJon_Lap
objRS(“DJon_Other") = DJon_Other
objRS(“DJon_OtherTXT") = DJon_OtherTXT
objRS(“ComputerProdRem_NA") = ComputerProdRem_NA
objRS(“ComputerProdRem_MAC") = ComputerProdRem_MAC
objRS(“ComputerProdRem_PC") = ComputerProdRem_PC
objRS(“ComputerProdRem_Other") = ComputerProdRem_Other
objRS(“ComputerProdRem_OtherTXT") = ComputerProdRem_OtherTXT
objRS(“CableTV") = CableTV
objRS(“OwnComputerTYPE_NA") = OwnComputerTYPE_NA
objRS(“OwnComputerTYPE_MAC") = OwnComputerTYPE_MAC
objRS(“OwnComputerTYPE_PC") = OwnComputerTYPE_PC
objRS(“OwnComputerTYPE_Other") = OwnComputerTYPE_Other
objRS(“OwnComputerTYPE_OtherTXT") = OwnComputerTYPE_OtherTXT
objRS(“ComputerGames") = ComputerGames
objRS(“GamesConsoleTYPE_NA") = GamesConsoleTYPE_NA
objRS(“GamesConsoleTYPE_PS") = GamesConsoleTYPE_PS
objRS(“GamesConsoleTYPE_XBOX") = GamesConsoleTYPE_XBOX
objRS(“GamesConsoleTYPE_Nintendo") = GamesConsoleTYPE_Nintendo
objRS(“GamesConsoleTYPE_Other") = GamesConsoleTYPE_Other
objRS(“GamesConsoleTYPE_OtherTXT") = GamesConsoleTYPE_OtherTXT
objRS(“Internet_NA") = Internet_NA
objRS(“Internet_ISDN") = Internet_ISDN
objRS(“Internet_cafe") = Internet_cafe
objRS(“Internet_Cable") = Internet_Cable
objRS(“Internet_work") = Internet_work
objRS(“Internet_DSL") = Internet_DSL
objRS(“Internet_28") = Internet_28
objRS(“Internet_T1") = Internet_T1
objRS(“Internet_56") = Internet_56
objRS(“Internet_Dontknow") = Internet_Dontknow
objRS(“Peer2PeerUSE") = Peer2PeerUSE
objRS(“OnlineMusic_LISTEN") = OnlineMusic_LISTEN
objRS(“OnlineMusic_PURCHASE") = OnlineMusic_PURCHASE
objRS(“OnlineOther_PURCHASE") = OnlineOther_PURCHASE
objRS(“Internet_Calls") = Internet_Calls
objRS(“Fave_LondClubTXT") = Fave_LondClubTXT
objRS(“Fave_LondBarTXT") = Fave_LondBarTXT
objRS(“Fave_AlchoTXT") = Fave_AlchoTXT
objRS(“Fave_NonAlchoTXT") = Fave_NonAlchoTXT
objRS(“Fave_LondFestTXT") = EmailTXT
objRS(“Fave_LondFestTXT") = Fave_LondFestTXT
objRS(“Fave_UKFest") = Fave_UKFest
objRS(“Fave_IntFestTXT") = Fave_IntFestTXT
objRS(“Fave_ClubHilidayTXT") = Fave_ClubHilidayTXT
objRS(“ClubTransport_Bus") = ClubTransport_Bus
objRS(“ClubTransport_Black") = ClubTransport_Black
objRS(“ClubTransport_Walk") = ClubTransport_Walk
objRS(“ClubTransport_Car") = ClubTransport_Car
objRS(“ClubTransport_Tube") = ClubTransport_Tube
objRS(“ClubTransport_Train") = ClubTransport_Train
objRS(“ClubTransport_mini") = ClubTransport_mini
objRS(“ClubTransport_Other") = ClubTransport_Other
objRS(“ClubTransport_OtherTXT") = ClubTransport_OtherTXT
objRS(“UnlicensedCabs") = UnlicensedCabs
objRS(“Drinks_Beer") = Drinks_Beer
objRS(“Drinks_Spirits") = Drinks_Spirits
objRS(“Drinks_Soft") = Drinks_Soft
objRS(“Drinks_Juice") = Drinks_Juice
objRS(“Drinks_Water") = Drinks_Water
objRS(“Drinks_Alcopops") = Drinks_Alcopops
objRS(“Drinks_Other") = Drinks_Other
objRS(“Drinks_OtherTXT") = Drinks_OtherTXT
objRS(“Drinks_BrandsTXT") = Drinks_BrandsTXT
objRS(“travelUK") = travelUK
objRS(“travelOS") = travelOS
objRS(“travelIbiza") = travelIbiza
objRS(“IbizaYes_notimes") = IbizaYes_notimes
objRS(“IbizaNo_liketogo") = IbizaNo_liketogo
objRS(“Ibiza_thisyr") = Ibiza_thisyr
objRS(“Airline_BA") = Airline_BA
objRS(“Airline_Iberia") = Airline_Iberia
objRS(“Airline_Easy") = Airline_Easy
objRS(“Airline_BMI") = Airline_BMI
objRS(“Airline_Ryan") = Airline_Ryan
objRS(“Airline_Luft") = Airline_Luft
objRS(“Airline_Virgin") = Airline_Virgin
objRS(“Airline_Other") = Airline_Other
objRS(“Airline_OtherTXT") = Airline_OtherTXT
objRS(“Travel_Other_Boat") = Travel_Other_Boat
objRS(“Travel_Other_Bus") = Travel_Other_Bus
objRS(“Travel_Other_Train") = Travel_Other_Train
objRS(“Travel_Other_Euro") = Travel_Other_Euro
objRS(“Travel_Other_car") = Travel_Other_car
objRS(“Travel_Other") = Travel_Other
objRS(“Travel_OtherTXT") = Travel_OtherTXT
objRS(“Shopping_city") = Shopping_city
objRS(“Shopping_High") = Shopping_High
objRS(“Shopping_Onl") = Shopping_Onl
objRS(“Shopping_Oxf") = Shopping_Oxf
objRS(“Shopping_Bout") = Shopping_Bout
objRS(“Shopping_Mkts") = Shopping_Mkts
objRS(“Shopping_Reg") = Shopping_Reg
objRS(“Shopping_Cov") = Shopping_Cov
objRS(“Shopping_other") = Shopping_other
objRS(“Shopping_otherTXT") = Shopping_otherTXT
objRS(“Clubwear_Spend") = Clubwear_Spend
objRS(“DownTime_Pubs") = DownTime_Pubs
objRS(“DownTime_Psport") = DownTime_Psport
objRS(“DownTime_cinema") = DownTime_cinema
objRS(“DownTime_Wsport") = DownTime_Wsport
objRS(“DownTime_DVD") = DownTime_DVD
objRS(“DownTime_Read") = DownTime_Read
objRS(“DownTime_theatre") = DownTime_theatre
objRS(“DownTime_Console") = DownTime_Console
objRS(“DownTime_Music") = DownTime_Music
objRS(“DownTime_PC") = DownTime_PC
objRS(“DownTime_gigs") = DownTime_gigs
objRS(“DownTime_Gym") = DownTime_Gym
objRS(“DownTime_Other") = DownTime_Other
objRS(“DownTime_OtherTXT") = DownTime_OtherTXT
objRS(“AboutYou_Age") = AboutYou_Age
objRS(“Aboutyou_Sex") = Aboutyou_Sex
objRS(“AboutYou_WhereLive") = AboutYou_WhereLive
objRS(“AboutYou_Zip") = AboutYou_Zip
objRS(“AboutYou_Educ") = AboutYou_Educ
objRS(“AboutYou_marital") = AboutYou_marital
objRS(“AboutYou_kids") = AboutYou_kids
objRS(“Employment_Status") = Employment_Status
objRS(“AboutYou_income") = AboutYou_income
objRS(“anythingelseTXT") = anythingelseTXT

'Finally, we call the update method to finish creating this record. Without calling the
'update method, it will not add the record so don't forget it.
objRS.Update

'Now we clean things up by closing our connection and recordset and setting both equal to nothing
objRS.Close
Set objRS = nothing
objConn.Close
Set objConn = nothing
Response.redirect "thankyou.htm"
%>

-----------------------------
1st asp page (survey page) code:
-----------------------------
available if required - just a basic frontpage asp page with a form containing survey Qs that is posted to 2nd asp page

HELP!!!!!!!!!!!!!!!!!Start Free Trial
[+][-]05.16.2006 at 04:00AM PDT, ID: 16689353

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: feedback, write
Sign Up Now!
Solution Provided By: MsShadow
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05.16.2006 at 10:22AM PDT, ID: 16692681

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32