Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 14th, 2005, 11:14 AM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Checkbox values HELP!

I have a list of questions that a user can answer YES or NO to. I am successfully splitting the values and they are being entered into the databse correctly. However, I also need to assign each answer to a factor point (i.e. 2.1, 2.2, 2.3 etc.) and enter the factor point into the database also.

This is probably something really silly that I'm missing, but I am confused on how to get the factor point. Here is my code:

Code:
            MyArrayAnswer = split(Request.Form("chkAnswer"),",")
            If Request.Form("chkAnswer") <> "" Then                
                For i = 0 to ubound(MyArrayAnswer,1)
                    Response.Write "<h1>" & "INSERT INTO tblMOCFactor (FactorPoint, FactorYesNo, MainID) VALUES('" & 2 & chr(46) & Trim(fp) & "', '" & Trim(MyArrayAnswer(i)) & "', " & varMOCID & ")" & "</h1>"
                Next
            End If


Maybe there is an easier way to do this?

Thanks,

Tammi
 
Old January 14th, 2005, 05:48 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Hi,

 Can u paste the FORM code from which data is posted?

Thanks



Om Prakash
 
Old January 18th, 2005, 09:29 AM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Om,

I figured out a workaround.

Tammi





Similar Threads
Thread Thread Starter Forum Replies Last Post
Retriving values from html:checkbox skumar Struts 1 July 16th, 2008 04:37 AM
checkbox values to dropdown december Classic ASP Professional 1 July 3rd, 2006 08:34 PM
Binding a checkbox that contain Y/N values aad1 C# 1 May 17th, 2006 07:23 PM
How do I send boolean values with a checkbox babou SQL Server ASP 2 March 28th, 2005 05:43 AM
checkbox values zaman1111 Javascript 2 September 22nd, 2004 04:19 PM





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