filtering results by input box?

filtering results by input box?

am 15.01.2008 14:36:34 von Kevin

Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL
Server 2005.. I've connected to the DB using dreamweaver and
sucessfully displayed a recordset on a page as follows:


<%@ Page Language="VB" ContentType="text/html"
ResponseEncoding="utf-8" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=bl ahblahblah,culture=neutral"
%>
id="CosNums"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_C ONNECTION_STRING_kev")
%>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_C ONNECTION_DATABASETYPE_kev")
%>'
CommandText='<%# "select distinct SL.CustomerAccountName,
SL.CustomerAccountNumber, SIC.documentno, SOP.documentdate,
SOP.AnalysisCode4 from dbo.SLCustomerAccount SL, dbo.SOPorderReturn
SOP, dbo.SOPOrderReturnLine SOPL, dbo.SOPInvoiceCredit SIC,
dbo.SOPInvoiceCreditLine SICL WHERE SOP.CustomerID =
SL.SLCustomerAccountID AND SOP.SOPOrderReturnID =
SOPL.SOPOrderReturnID AND SOPL.SOPOrderReturnLineID =
SICL.SOPOrderReturnLineID AND SICL.SOPInvoiceCreditID =
SIC.SOPInvoiceCreditID AND SL.CustomerAccountNumber = " + Chr(39) +
"CHE001" + Chr(39) + "" %>'
Debug="true"
>

www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Untitled Document




runat="server"
AllowSorting="False"
AutoGenerateColumns="false"
CellPadding="3"
CellSpacing="0"
ShowFooter="false"
ShowHeader="true"
DataSource="<%# CosNums.DefaultView %>"
PagerStyle-Mode="NextPrev"
>
ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="smaller" />


ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="smaller" />


HeaderText="CustomerAccountName"
ReadOnly="true"
Visible="True"/>
HeaderText="CustomerAccountNumber"
ReadOnly="true"
Visible="True"/>
HeaderText="documentno"
ReadOnly="true"
Visible="True"/>
HeaderText="documentdate"
ReadOnly="true"
Visible="True"/>
HeaderText="AnalysisCode4"
ReadOnly="true"
Visible="True"/>








now, my question is, how can i create a simple form with one input box
so that i can change the current hardcoded filter from:

SL.CustomerAccountNumber = 'CHE001'

to whatever is entered into the input box.

thanks in advance, any help or tips would be much appreciated!!
I've had a search in here and online but can't find anything.. i might
be searching for the wrong solution though!

kev :)

Re: filtering results by input box?

am 15.01.2008 15:12:44 von Tom van Stiphout

On Tue, 15 Jan 2008 05:36:34 -0800 (PST), kevin@nu-urbanmusic.co.uk
wrote:

Better ask that question in a Dreamweaver newsgroup.
-Tom.


>Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL
>Server 2005.. I've connected to the DB using dreamweaver and
>sucessfully displayed a recordset on a page as follows:

Re: filtering results by input box?

am 15.01.2008 15:51:49 von Kevin

On Jan 15, 2:12=A0pm, Tom van Stiphout wrote:
> On Tue, 15 Jan 2008 05:36:34 -0800 (PST), ke...@nu-urbanmusic.co.uk
> wrote:
>
> Better ask that question in a Dreamweaver newsgroup.
> -Tom.
>
> >Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL
> >Server 2005.. I've connected to the DB using dreamweaver and
> >sucessfully displayed a recordset on a page as follows:
>
>

does it make a difference what package i use to create the page, what
if i'd have used notepad?!
isn't the code the same?
sorry for my ignorance!

Re: filtering results by input box?

am 15.01.2008 16:01:41 von Kevin

can i do it in microsoft visual studio instead somehow?

Re: filtering results by input box?

am 16.01.2008 00:11:45 von Erland Sommarskog

(kevin@nu-urbanmusic.co.uk) writes:
> On Jan 15, 2:12 pm, Tom van Stiphout wrote:
>> On Tue, 15 Jan 2008 05:36:34 -0800 (PST), ke...@nu-urbanmusic.co.uk
>> wrote:
>>
>> Better ask that question in a Dreamweaver newsgroup.
>> -Tom.
>>
>> >Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL
>> >Server 2005.. I've connected to the DB using dreamweaver and
>> >sucessfully displayed a recordset on a page as follows:
>>
>>
>
> does it make a difference what package i use to create the page, what
> if i'd have used notepad?!
> isn't the code the same?
> sorry for my ignorance!

The question was about getting a value from an input box. And, no,
that is not an SQL Server problem. You would have exactly the problem
if you connected to Oracle, DB2 or whatever. SQL Server cannot access
your form or you input.

If what you posted is Dreamweaver, you need to ask in a Dreamweaver
newsgroup. Mind you, I don't even know what Dreamweaver is. And we are
not supposed to this here either.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx

Re: filtering results by input box?

am 16.01.2008 04:56:37 von Tom van Stiphout

On Tue, 15 Jan 2008 06:51:49 -0800 (PST), kevin@nu-urbanmusic.co.uk
wrote:

Yes it does make a huge difference. Each tool connects to the database
differently, and binds controls to fields in the database differently.
In a Dreamweaver group they can tell you how to do that with that
tool.

-Tom.



>On Jan 15, 2:12 pm, Tom van Stiphout wrote:
>> On Tue, 15 Jan 2008 05:36:34 -0800 (PST), ke...@nu-urbanmusic.co.uk
>> wrote:
>>
>> Better ask that question in a Dreamweaver newsgroup.
>> -Tom.
>>
>> >Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL
>> >Server 2005.. I've connected to the DB using dreamweaver and
>> >sucessfully displayed a recordset on a page as follows:
>>
>>
>
>does it make a difference what package i use to create the page, what
>if i'd have used notepad?!
>isn't the code the same?
>sorry for my ignorance!

Re: filtering results by input box?

am 16.01.2008 13:18:30 von Kevin

cheers tom, thanks for your help :)
it's good to here why so i can start to understand.

kev :)

Re: filtering results by input box?

am 16.01.2008 19:03:33 von giorgi.piero

On Jan 15, 5:36=A0am, ke...@nu-urbanmusic.co.uk wrote:

> Hi, i'm new to mssql, i've come from php/mysql.. anyway, i'm using SQL
> Server 2005.. I've connected to the DB using dreamweaver and
> sucessfully displayed a recordset on a page as follows:
>
> <%@ Page Language=3D"VB" ContentType=3D"text/html"
...

> now, my question is, how can i create a simple form with one input box
> so that i can change the current hardcoded filter from:
>
> SL.CustomerAccountNumber =3D 'CHE001'
>
> to whatever is entered into the input box.

Ok, you are in a wrong newsgroup.
HOWEVER... just go to the Dataset dialog box and select the field used
as to enter the filter...

P