Hi,

I have this portal I'm working with and I want to use the general search SSI (which actually searches all channels) and save it as a different page to be a search for just one of the channels.

Here's the code for the general search form:

Code:
<%
Dim rsDropDownsearch
Dim rsDropDownsearch_numRows

Set rsDropDownsearch = Server.CreateObject("ADODB.Recordset")
rsDropDownsearch.ActiveConnection = MM_connDUportalPro_STRING
rsDropDownsearch.Source = "SELECT DISTINCT *  FROM CHANNELS  WHERE CHA_ACTIVE=1  ORDER BY CHA_MENU ASC"
rsDropDownsearch.CursorType = 0
rsDropDownsearch.CursorLocation = 2
rsDropDownsearch.LockType = 1
rsDropDownsearch.Open()

rsDropDownsearch_numRows = 0
%>
<%
Dim rsDropDownsearch__numRows
Dim rsDropDownsearch__index

rsDropDownsearch__numRows = -1
rsDropDownsearch__index = 0
rsDropDownsearch_numRows = rsDropDownsearch_numRows + rsDropDownsearch__numRows
%>
And here is the form code:

Code:
<form name="search" method="get" action="/home/search.asp">
            <td align="left" valign="top" class="bgTable"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="1" class="bgTableBorder"><img src="/<%= strTheme %>/_spacer.gif"></td>
                  <td align="left" class="bgTable" valign="top"> <table width="100%" border="0" cellspacing="2" cellpadding="2">
                      <tr align="left" valign="middle"> 
                        <td class="textBold">Keywords:</td>
                        <td><input name="keyword" type="text" class="form" id="keyword" size="14" maxlength="100"></td>
                      </tr>
                      <tr align="left" valign="middle"> 
                        <td class="textBold">Search In: </td>
                        <td><select name="iChannel" class="form" id="iChannel">
                            <option value="" selected>Entire Site</option>
                            <%
While (NOT rsDropDownsearch.EOF)
%>
                            <option value="<%=(rsDropDownsearch.Fields.Item("CHA_ID").Value)%>"><%=(rsDropDownsearch.Fields.Item("CHA_MENU").Value)%></option>
                            <%
  rsDropDownsearch.MoveNext()
Wend
If (rsDropDownsearch.CursorType > 0) Then
  rsDropDownsearch.MoveFirst
Else
  rsDropDownsearch.Requery
End If
%>
                          </select></td>
                      </tr>
                      <tr align="left" valign="middle"> 
                        <td>&nbsp;</td>
                        <td><input name="Submit" type="submit" class="button" onClick="MM_validateForm('keyword','','R');return document.MM_returnValue" value="Search"></td>
                      </tr>
                    </table></td>
                  <td width="1" class="bgTableBorder"><img src="/<%= strTheme %>/_spacer.gif"></td>
                </tr>
              </table></td>
          </form>
I have very little experience with Databases, but I did a little research and have learned a few things. I've tried to in the:

rsDropDownsearch.Source = "SELECT DISTINCT * FROM CHANNELS WHERE CHA_ACTIVE=1 ORDER BY CHA_MENU ASC"

To change it from Select distinct to Select Links (table) but I couldn't get that to work.

I've tried this:

rsDropDownsearch.Source = "SELECT LIN_AREAS FROM LINKS WHERE LIN_ACTIVE=1 ORDER BY LIN_MENU ASC"

where the Lin_Areas is a column in the Links Table, but I get this error:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10' 

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. 

/includes/inc_citysearch.asp, line 35
What I want is the form to search the 'Links' table and display all links when someone searches for a key word. I don't want the dropdown for all the other channels.

Can some wise database expert help me out? Thanks!

Dan