ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

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 ASP Free Forums Sponsor:
  #1  
Old March 8th, 2000, 05:23 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
web survey need help

<i><b>Originally posted by : hammax (hammax_2000@yahoo.com)</b></i><br />Background:<br /><br />I am trying to create a web survey for one of my professors at the college I attend. The survey is 7 separate pages with the data going into one database file. I am only using text boxes and radio buttons. The database is composed of one table (using Access 97) with all the variables in that one table. The problem I am having is keeping track of each particular person as they go through the survey because they will be more than one person at a time probably no more than 10. I have also been told I am can not use cookies. On the first page of the survey they put in their name, email, etc. Then they assigned an auto number. I can get data inserted into the table using the add record w/sql script I downloaded of this site. I don't know VB Script I am just looking for something to modify.<br /><br />Here is what I need help with:<br /><br />1. Does anyone have a script that will help me capture the auto number so that the database know which record to update from the other pages in the survey?<br /><br />2. Should I not use autonumber and kick out a unique ID manually? If so how do I do it?<br /><br />3. Should I use 7 separate tables instead of one table? Would this be easier?<br /><br />4. What about using a session object?<br /><br />Thanks for your help<br />

Reply With Quote
  #2  
Old March 10th, 2000, 04:33 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Dave Z (dizidog@aol.com)</b></i><br /><br />lots of questions... one at a time! scroll down<br /><br />------------<br />hammax at 3/8/2000 3:23:18 PM<br /><br />Background:<br /><br />I am trying to create a web survey for one of my professors at the college I attend. The survey is 7 separate pages with the data going into one database file. I am only using text boxes and radio buttons. The database is composed of one table (using Access 97) with all the variables in that one table. The problem I am having is keeping track of each particular person as they go through the survey because they will be more than one person at a time probably no more than 10. I have also been told I am can not use cookies. On the first page of the survey they put in their name, email, etc. Then they assigned an auto number. I can get data inserted into the table using the add record w/sql script I downloaded of this site. I don't know VB Script I am just looking for something to modify.<br /><br />Here is what I need help with:<br /><br />1. Does anyone have a script that will help me capture the auto number so that the database know which record to update from the other pages in the survey?<br /><br />A. As soon as you Insert the data, (Preferably SQL) I would use a recordset object to get the auto number. Like soActual line breaks are double spaced)<br /><br />dim conn<br /><br />dim rs<br /><br />dim strconn<br /><br />strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("yourMDB.mdb")<br /><br />set conn = server.createobject("adodb.connection")<br />conn.open strconn<br /><br /><br />SQL = "INSERT INTO Contacts(FirstName, MiddleName, LastName)"&_<br /><br />"VALUES ('"& request("FirstName")&"','"& request("MiddleName") &"',"&_<br /><br />"'" & bless(request("LastName")) &"');"<br /><br /><br />Conn.Execute(SQL)<br /><br />dim AppID<br /><br />set rs1 = Server.CreateObject("ADODB.Recordset") <br /><br />SQL="SELECT AppID FROM Contacts" &_<br />" WHERE ((FirstName ='" & Request.form("FirstName")& "')" &_<br /><br />" AND (LastName ='" & bless(request("LastName")) & "'));"<br /><br />Set rs1 = Conn.Execute(SQL) <br /><br />set AppID = rs1("AppID")%><br /><br />oops, that's two SQL queries...oh well<br /> the bless functions are a replace() for single quotes ( they give errors for names like O'Malley, or words like "don't)<br />then you can pass the AppID variable through hidden form fields.<br /><input type=hidden value= <%=AppID%><br /><br />2. Should I not use autonumber and kick out a unique ID manually? If so how do I do it?<br /><br />A. I would use autonumber. Nothing manual, sounds too much like labor!<br /><br />3. Should I use 7 separate tables instead of one table? Would this be easier?<br /><br />I find separate tables easier to work with, besides I don't believe you can insert data into one table with separate forms. I know you can't insert data into separate tables with one form.<br /><br />4. What about using a session object?<br /><br />A. Sorry, not sure what you mean here.<br /><br />Thanks for your help<br />Hope I did.

Reply With Quote
  #3  
Old March 10th, 2000, 04:35 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : hammax (hammax_2000@yahoo.com)</b></i><br />Sorry about so many questions I have been to this site lots of times but I have not ever posted on here before. So what I was talking about a session object, it is keeps track of everything entered in during once instance in the global.asa file, then is write everything into the database all at one time. Do you know what this is about? I will try that script. Thank you so much.<br /><br /><br />------------<br />Dave Z at 3/10/2000 2:33:52 AM<br /><br /><br />lots of questions... one at a time! scroll down<br /><br />------------<br />hammax at 3/8/2000 3:23:18 PM<br /><br />Background:<br /><br />I am trying to create a web survey for one of my professors at the college I attend. The survey is 7 separate pages with the data going into one database file. I am only using text boxes and radio buttons. The database is composed of one table (using Access 97) with all the variables in that one table. The problem I am having is keeping track of each particular person as they go through the survey because they will be more than one person at a time probably no more than 10. I have also been told I am can not use cookies. On the first page of the survey they put in their name, email, etc. Then they assigned an auto number. I can get data inserted into the table using the add record w/sql script I downloaded of this site. I don't know VB Script I am just looking for something to modify.<br /><br />Here is what I need help with:<br /><br />1. Does anyone have a script that will help me capture the auto number so that the database know which record to update from the other pages in the survey?<br /><br />A. As soon as you Insert the data, (Preferably SQL) I would use a recordset object to get the auto number. Like soActual line breaks are double spaced)<br /><br />dim conn<br /><br />dim rs<br /><br />dim strconn<br /><br />strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("yourMDB.mdb")<br /><br />set conn = server.createobject("adodb.connection")<br />conn.open strconn<br /><br /><br />SQL = "INSERT INTO Contacts(FirstName, MiddleName, LastName)"&_<br /><br />"VALUES ('"& request("FirstName")&"','"& request("MiddleName") &"',"&_<br /><br />"'" & bless(request("LastName")) &"');"<br /><br /><br />Conn.Execute(SQL)<br /><br />dim AppID<br /><br />set rs1 = Server.CreateObject("ADODB.Recordset") <br /><br />SQL="SELECT AppID FROM Contacts" &_<br />" WHERE ((FirstName ='" & Request.form("FirstName")& "')" &_<br /><br />" AND (LastName ='" & bless(request("LastName")) & "'));"<br /><br />Set rs1 = Conn.Execute(SQL) <br /><br />set AppID = rs1("AppID")%><br /><br />oops, that's two SQL queries...oh well<br /> the bless functions are a replace() for single quotes ( they give errors for names like O'Malley, or words like "don't)<br />then you can pass the AppID variable through hidden form fields.<br /><input type=hidden value= <%=AppID%><br /><br />2. Should I not use autonumber and kick out a unique ID manually? If so how do I do it?<br /><br />A. I would use autonumber. Nothing manual, sounds too much like labor!<br /><br />3. Should I use 7 separate tables instead of one table? Would this be easier?<br /><br />I find separate tables easier to work with, besides I don't believe you can insert data into one table with separate forms. I know you can't insert data into separate tables with one form.<br /><br />4. What about using a session object?<br /><br />A. Sorry, not sure what you mean here.<br /><br />Thanks for your help<br />Hope I did.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > web survey need help


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 3 hosted by Hostway
Stay green...Green IT