What I'm interested in is ideas about how to handle the situation where
your
Website has only one aspx page and many ascx pages.  This appears to
Introduce a layer of confusion where you have to load the appropriate
Ascx page.

Mark


-----Original Message-----
From: Adrian Bateman [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 24 September 2002 12:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Best way to create a search feature in
asp.net websites?


Well, you could do something like:

string query = "SELECT rank,filename FROM Documents..SCOPE() WHERE
CONTAINS('telephone') ORDER BY rank DESC";
OleDbConnection conn = new OleDbConnection("Provider=MSIDXS");
OleDbCommand cmd = new OleDbCommand(query,conn);
conn.Open();
OleDbDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
while(dr.Read()) {
        Console.WriteLine("{0}: {1}",dr["rank"],dr["filename"]); }

This way, you can end up with a managed data reader or dataset with
which you could do data binding, etc. if necessary. Yes, it does need
you to build a query, but there aren't really tables and relationships
to deal with as such.

Regards,

Adrian.

On 23 September 2002 11:33, Tommy Ryan wrote:
> I could go down that path, but I am not abstracted from the details of

> index server.  I am have gone down the path of interop.  Won't be as
fast,
> but at least I have an API and not going agains raw storage of data.
>
>    Dim Q As Object = Server.CreateObject("ixsso.Query")
>    Dim Util As Object = Server.CreateObject("ixsso.Util")
>
>    Q.Query = searchString  ' String provided by user.
>    Q.Catalog = ConfigurationSettings.AppSettings.Item("Catalog")
>    Q.SortBy = "rank[d]"
>    Q.Columns = "vpath, path, filename, write, characterization, rank"
>    Q.MaxRecords = 10
>
>    For Each searchScopeItem In searchScopeItems
>       Util.AddScopeToQuery(Q, searchScopeItem, "deep")
>    Next
>
>    Dim searchResults As Object = Q.CreateRecordSet("nonsequential")
>
>    'Iterate through resultset and format into result table.
>
> I would think that going against the data provider directly, that I
would
> have to create queries/sprocs that would have knowledge of tables, 
> relationships, and constraints on the data storage.  Right now I will 
> stick with interop until there is some equivalent within the
Framework.
>
> Thanks for your suggestion Adrian.
>
> Cheers,
>
> Tommy
>
> You can read messages from the Advanced DOTNET archive, unsubscribe
from Advanced DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>
>

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to