Repopuate A Multiple Select

I am trying to repopulate a multiple select box in a webpage from a recordset.

Say I have the following recordset.

sSQL = "select geoID from table1 where srID = 3"
set adoRS = adoConn.Execute(sSQL)

Lets assume that it returns three records with geoID = 1, 2, 5

Lets say I am building a multiple select as follows: Code:

View Replies


ADVERTISEMENT

Multiple Select After Validation

I have a fairly simple problem that I can't find a straightforward solution to. It is a form which is checked server side using ASP to make sure certain fields are valid and then re-outputs the form if it fails with the fields already filled in, including multiple select boxes. The solution using PHP would be: Code:

View Replies View Related

Select Multiple Distincts

Is it possible to query a database base on 2 distinct fields

I have tried this, but it did not work My Query:

SELECT DISTINCT rDateTime, DISTINCT rSessionID FROM TBL_RESPONSES WHERE rsID=" & iSID & " AND ruID=" & iUID

the error i got is: Code:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'DISTINCT'.

View Replies View Related

Select Multiple Data

Currently I have a combo box that shows records from a Select query using Group By. So it only shows each record type once. I can currently search for records using the combo box but I want to search for multiple records in the combo box.

For example, if in the combo box it shows records: Adam, Bob, Carl,,,etc.. Right now if I click on Adam, the search will bring up all of the Adams. What I want to be able to do is to be able to click on multiple records such as Adam and Carl and have all of the Adam and Carls show up.

View Replies View Related

Reading Multiple Select

I use a multiple select in a form in an asp page. When I go to the target page, I want to be able to read out the items selected on the previous page. How can I do that?

<form method="post" action="compare1.asp" name="Compare">

<select name="motorcycle" multiple size="20">

<%While not RSItems.eof%>
<option
value="<%=RSItems("ID")%>"><%=RSItems("Brand")%>&nbsp;<%=RSItems("Type")%>
<%
RSItems.movenext
wend
%>

</select>
</form>

How can I read out the items selected?

View Replies View Related

Select Multiple Option Not Working

I have a form search page with many field options but this one field I would like to select multiple options.

I have this on the search screen for my multiple field where I pull the list of options from my database: Code:

View Replies View Related

Submit Items From Select Multiple

I want to submit items from <select multiple> list into database.Should I use arrays?

View Replies View Related

Select Multiple Items From A Dropdown

I want an ASP page with a dropdown and a simple button. Every time the user
chooses an item from the dropdown and clicks on the button i want that value
written below in list and allow user to select more.

Also how can these choices be saved somehow so tha when the user goes to the
next page the choices he made can be written to the database. For example

The choices in the dropdown may be:

London
Dublin
Paris
New York

When the user chooses Dublin I want ti written below the dropdown. Then when
he chooses New York. I want it added to london. so that it displays

Dublin
London

Then when he click next button these two choices are taken over to the next
page where an insert query can be used to insert them into the db.

View Replies View Related

Select Different Fields In Multiple Tables

I have 4 tables first table category (category_id and category name in it)
second table artist (artist_id, category_id, artistname in it)
third table album (id, artist_id, album_title in it)
forth table song (id, album_id, title in it)

I'm selecting category in first page
I'm selecting artist in second page
I'm selecting album in third page

I'm requesting, collecting and posting all id's to the next page.

this is the question!!

How can I read from database

1- category name when I was selected in first page
2- artist name when I was selected in second page
3- album name when I was selected in third page

View Replies View Related

Multiple Select In Dropdown List Box

How to make multiple select in dropdown list box using asp and access.

View Replies View Related

ResultSet For Multiple Select Lists

I am populating a SELECT list from a result set. I need the same result set to populate a second SELECT list. Only one list is being populated. How can I get this to populate both? Here is my code:

<select name="options" size=10 multiple="multiple">
<% while (!rs.EOF) { %>
<option value="<%=(rs.Fields.Item("FIELD1").Value)%>">
<%=(rs.Fields.Item("FIELD1").Value)%>
</option>
<% rs.MoveNext(); }
if (rs.CursorType > 0) {
if (!rs.BOF) rs.MoveFirst();
} else {
rs.Requery();
}
%>
</select>

View Replies View Related

Multiple Select Options At The Same Page

I m trying to use multiple option menu using redirect function in ASP.

I managed to do a single option but I need to use multiple options can you please advise on how to do this, so both options apear in the same page. for instance, in the code below a user should be able to select uk and also selects between the other options; population, geography from the same page. Code:

View Replies View Related

How To Submit All Items From A Multiple Select Control

I have a form with two multiple select control (I named the first as cbo_source and the second as cbo_target). Once the form is loaded, the cbo_source loads all items from an MS Access database. Once i click the button >>, all the selected fields from the cbo_source should be transferred on the cbo_target control.

Well, I'm done with that using javascript, my problem is how am i going to get all the items from the cbo_target control once i submitted the form to an asp page(add_new_sched.asp)? I can only get items that are selected on the cbo_target, but what i need is to get all items from the cbo_target regardless if it's selected or not. Code:

View Replies View Related

Split Function And Multiple Select Drop Down

I have a multiple select drop down. It will load into it the following information: Student ID, Last Name, First Name

There will be another drop down box that loads with classes, only this is not a multiple select.

I need the user to be able to select all students they need from the first drop down and then select the class they want to insert them into. Then, when they hit the button, it will break up the data from the first, Student ID, Last Name, First Name and insert those three things into the database under those respective column names.

Does anybody know how I can split these up properly when there will be multiple students selected, or does anybody have a better way of doing this?

View Replies View Related

Select Database Then Multiple Tables For Updates

What I want to do I select one database and the set the Rs1, rs2 etc.. like in Vb6 I would set DB then:

Set rs1 = db1.OpenRecordSet("Table1")
Set rs2 = db1.OpenRecordSet("Table2")

etc...

However how do I do this in asp3? Code:

View Replies View Related

Create SQL String With Multiple Select Boxes

I am working with an ASP app that creates reports based on data in an SQL Server 200 database. There is a web form with select boxes for the user to select their criteria, and based on that an SQL SELECT statement is generated.

One of the requirements is that some fields need to be multiple selections. The output of these fields are in CSV format (One, Two, Three). These values are all alphanumeric, NOT just numeric....

View Replies View Related

Selecting Multiple Tables Using SELECT Statment Problem

I am Trying to use the SQL SELECT Statment to open records from multiple tables into one recordset.

I know the basic syntax of the Select statment but I wanted to know if its possible to recive the table name from the feild or the record that I am readinf from the recordset in any given moment.

To make things more clear, my example:

-Open a connection

SQL = "SELECT * FROM TABLE1,TABLE2 WHERE TABLE1.UserID=" & uid & " And TABLE2.UserID=" & uid

rs.open sql,conn,3,3

while not rs.EOF

-read from record

rs.movenext
wend
rs.close
conn.close

now, in the part that I read from the record, is their any way I can know if that record is from table1 or table2?

View Replies View Related

Freeaspupload: Retrieving Multiple Values From A Select Field

I'm having problems retrieving all the values from a multiple selection field using the freeaspupload component.

I'm creating an online email app that uses the freeaspupload to add attachement functionality, which means the form encoding type is multipart/form-data. I've done something similar with the persits aspupload component, and had no problems with that, but the freeaspupload version seems to handle <select> fields slightly differently. Code:

View Replies View Related

SQL Server - Update/Insert Multiple Cols Into Multiple Tables

Just as the title says I am trying to do something impossible with a single SQL statement. I am doing an ASP webpage for internal use at the company I work for.

I want to know if there is a way to insert/update data into multiple tables in 1 SQL statement.

If it requires functions | views or anything else that is fine but I don't want to have 3-4 different SQL statements to update 2-3 different columns in different tables.

View Replies View Related

Searching Multiple Memo Fields In Multiple Tables In Access

I have a search option on my website, which should perform a search on 4 fields, as follows:

tblNews
headline
content

tblDatabank
filename
description

It only needs to return matches which are an exact match of their search criteria. For instance, searching for "I am here" would return a record which contained "I am here", but not just "I" or "I am" etc.

I need to return all these records as part of one recordset preferably, as I want to be able to order them etc., though I imagine you may suggest I use an array somehow to merge two recordets etc., then reorder them?

View Replies View Related

Error Using <select></select>

I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.

The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:

View Replies View Related

How To Update Multiple Records With Different Multiple Value

i hav problem with updating the data. In the asp page i hav displayed records based on search criteria. in display mode im displaying the to be updated field in combo box for each similar contract_no. each contract_no will hav different no of rows and to be updated combo box.

based on the selected value in the combo boxes of different contract_nos i hav to update the combo value with old value. user select multiple combo values at a time I need anybody's help with detailed programming logic.

View Replies View Related

Select

does anyone know what I have wrong with this select in my form?

<%
sql = "SELECT * FROM [LTAB_CAProcessArea]"
Set ProcessAreaRS = Server.CreateObject("ADODB.Recordset")
ProcessAreaRS.Open sql, SessionCPRDBConnection, adOpenStatic, adLockOptimistic, adCmdText
%>

<select name="processarea">
<%
Do While Not ProcessAreaRS.EOF
Resonse.Write("<option name='" & ProcessAreaRS("processareaID") & "'>")
Response.Write(ProcessAreaRS("txtProcessArea"))
Response.Write("</option>")

View Replies View Related

<select> Help

I don't know if this is in the right section. I hope it is.I have an HTML document that uses tables and stuff. I also have a FORM on there with some input boxes, Radio buttons and <select> options.
I have a .asp VB file also that processes the actual form and writes the answered questions to a text file on the server (tab separated)
My problem:
The input boxes and radio buttons work fine. It writes to the text file on the sever end.

My problem is I am not too sure how to go making the answers from the <select> options to also write to the server. They way I have it set up right now, it jsut writes "NULL" on the text file.

View Replies View Related

SELECT Last Vs SELECT Max

I've recently come across using "Select Last" in an sql query. Does anyone have any info or views on using it? Until now I've relied on "Select Max" but Select Last would have distinct advantages when using random autonumbers. I'm also curious about why there is so little info on it - perhaps I'm looking in the wrong places?

View Replies View Related

[Select][Value]

I want to display an editable page extract from MS Access table. Now I want to show the value in Select list, extract from another table. Both tables are joinable with the foreign key.

In simplest, I want to extract and display the exact value from a table and show in Select list for edit.

I could not think of any way. I can bring up data and display in Select list but it would display the first value in the list only.

View Replies View Related

Select

i want to select all ids from table1 where those id's arent in table2
Sounds simple and iam sure could be possible in a single sql statement

View Replies View Related

SELECT TOP 50

I have the following SQL SELECT statement below that doesn't like the TOP 50 parameter. When I remove it, all is good. When I put it back I get "Incorrect syntax near '50'".
Code:
SELECT TOP 50 SSN, LName, FName, License_Certificate, Character_Identifier, CertificateNo, " & _
"tblIndividualInfo.IndividualID, tblLicense.LicenseID FROM tblIndividualInfo " & _
"INNER JOIN (tblLicense INNER JOIN stblLicenseType ON tblLicense.LicenseTypeID = stblLicenseType.ID) ON " & _
tblIndividualInfo.IndividualID = tblLicense.IndividualID " & strWhere & " ORDER BY LName, FName

View Replies View Related

Select Box

how to insert multiple items in a select box into a database. For example:

<select multiple name="ComservGroupAge" size="3">
<option value="Children">Children </option>
<option value="Adolescents">Adolescents </option>
<option value="Adults">Adults </option>
<option value="Does Not Matter">Does Not Matter</option>
</select>

I don't want it to go into my db column as one long field.

View Replies View Related

Select Sum

for this part. can i use

select sum (orderqty) from custorder

i attach a pic file to show wat i wanted to do
a few data will be listed out
i want the total from that particular few records only. not the whole records in database

View Replies View Related

SQL SELECT

I know this is an ASP forum but I've also gotten answers to my SQL problems here and I'd appreciate your help very much.
I have these two tables in SQL. Both tables have the same two columns (Description and SiebelName). I want to some how write a script that will look for the descriptions that matches the ones in Table1 with the ones in Table2 and if there are any I would like to take the column in Table2, SName, and update the column in Table1, SiebelName, with that of Table2.
Here's what I attempted to do but it's not working:
--------------------------------
UPDATE tbl_MasterTEST
SET tbl_MasterTEST.SiebelName = Siebel.SName WHERE (SELECT tbl_MasterTEST.ProdDesc, tbl_MasterTEST.SiebelName, Siebel.SDesc, Siebel.SName
FROM tbl_MasterTEST, Siebel
WHERE tbl_MasterTEST.ProdDesc = Siebel.SDesc)

View Replies View Related

For Each And Select

strSQL = "SELECT * FROM mod48 WHERE N_GEN = 5"
oRs.open strSQL,oConn,3

this table has alot of fields. I want it to automatically create alot of Text boxes for each field. But i also need the fields names. The only thing is that the field names in the table are well not very user friendly.

n_gen = General Numer
pa_name = Client Name
pa_surname = Client SurName

So i was wondering is there something i can do. Like a For each that will create alot of tect boxes for each field "with its value in it" and also make it write a description for the lable. Code:

View Replies View Related

Select Max 2x

Ik want to select 2 MAX values form one table, but i don't know how that works, and i can't find it anywhere.

This is what i got so far:

sql = "SELECT max(tekstindex), max(volgnummer) FROM menu"

I want to select max(tekstindex) as 'tekst' and max(volgnummer) as 'volg'.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved