Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Database Record

Posted on 2003-11-07
4
Medium Priority
?
214 Views
Last Modified: 2013-12-24
I have a query with Microsoft Frontpage because I am trying to learn HTML and ASP.

I have a list box on a web page that gets its values from a table called dbo_PRODUCT and a field called PRODUCTCODE.  When I publish the asp page it displays a list of the codes in that field.

What I dont know how to do is this :

The dbo_product table has columns of :

PRODUCTCODE      DESCRIPTION

I want to create a text box, so when the user selects a code from the productcode list the text box populates itself with the description.


Also I want to create a text box where the user can enter feedback.  I then want them to click a button called Save which will add the record to a table called Comments which has fields of PRODUCTCODE and COMMENTS.  So I want to be able to tell the form to add the record and use the PROUCTCODE that was selected in the list.

Can someone please help me through my learning curve ?  
0
Comment
Question by:Northumberland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:Northumberland
ID: 9706297
Does anybody know the answer to this ?
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9712129
Northumberland You posted the same question under Dreamweaver,
Did you to try to Follow those instructions?
0
 
LVL 10

Expert Comment

by:KenAdney
ID: 9716859
If I understand your question, here's how I propogate a drop down list from a database field.  First, I set up the sub routine:

'this sub requires that the data connection be established first (DataConn)
Sub drop_down_list(field_name,table_name)

sql_dropdown = ("SELECT DISTINCT " & field_name & " FROM " & table_name & " WHERE " & field_name & " <> '' ORDER BY " & field_name)
Set rs_dropdown = Server.CreateObject("ADODB.Recordset")
rs_dropdown.Open sql_dropdown, DataConn
response.write("<select name=" & field_name & " size='1'>")
response.write("<option value='0' selected>Select from list</option>")
rs_dropdown.MoveFirst
While Not rs_dropdown.EOF
      field_value = rs_dropdown(field_name)
      response.write("<option value='" & field_value & "'>" & field_value & "</option>")
      rs_dropdown.MoveNext
Wend
response.write("</select>")
rs_dropdown.Close
Set rs_dropdown = Nothing

End Sub
%>

Then wherever I want the drop down to appear, I only need:

<%call drop_down_list("field","table")%>
0
 
LVL 14

Accepted Solution

by:
hhammash earned 2000 total points
ID: 9718571
Hi,

Try this sample:
http://www.fmhs.uaeu.ac.ae/nml/900test.asp


Here is the article that explains how to do it.  In your case you can add another text area in the second form for feedback.

http://www.experts-exchange.com/Applications/MS_Office/FrontPage/Q_20780976.html

Regards
hhammash
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question