Database results from listbox

Results 1 to 2 of 2

Thread: Database results from listbox

  1. #1
    Steve Baltimore Guest

    Default Database results from listbox

    I am really new to ASP pages and am having my first go at it. I&#039m using Access and Frontpage 2000. I&#039m able to get my results on the page, but I need for my users to be able to choose from one of fields of the table (these will be the pull down choices)<BR>to get the results of the query their submiting. A page needs to have two selections... i.e. (Industry) then (Manufacturer) both with static selections. When the submit button is clicked the resulting page is those results from the database. All I&#039ve been able to do with what Frontpage offers in the wizards so far is let the user enter text for the search, and I need to offer choices. Hope this is enough info. for someone to be able to offer some help.

  2. #2
    Join Date
    Dec 1969
    Posts
    27

    Default RE: Database results from listbox

    I am not sure that I understand your question right but here is how you would pull field results from a database using a list box.<BR><BR>&#060;select name="Industry"&#062;<BR><BR>&#060;% <BR>Set SQLConn = Server.CreateObject("ADODB.Connection")<BR>SQLstr = "select * from (TableName)"<BR>SQLConn.Open "(databasename)"<BR>Set Results = SQLConn.Execute(SQLstr)<BR> Results.MoveFirst<BR>Do While Not Results.EOF<BR>%&#062; <BR><BR>&#060;option value="&#060;%= Results("(FieldName)") %&#062;"&#062;&#060;%= Results("(FieldName") %&#062;&#060;/option&#062;<BR>&#060;%<BR>Results.MoveNext<BR>Loo p<BR>Results.Close<BR>SQLConn.Close<BR>%&#062;<BR> &#060;/select&#062;<BR><BR>hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •