Ask a Question related to Dreamweaver AppDev, Design and Development.
-
juniorbee #1
Changing Sort criteria of DB table.
hello
whats the easiest way to change my recordsets sort criteria from say,
alphabetical order to town name, am i best using sql (if so whats the code) or
do i have to actually have to have two .asp pages with the different recordset
criteria's??
thanks
jay
juniorbee Guest
-
sort tablename in sql table
hi.. i have several tables where I need to sort the column name in a table; asc order.. how can i do that? ex: table is abc column name: yahoo,... -
Sort a repeat region in a table by clicking on the table headers
Sort a repeat region in a table by clicking on the table headers for ASP some help on this topic pls.. Rgds MeTin -
Weird Sort criteria
The dataView has the following columns: CodeType, Code, Description, Amount, CodeDate CodeType can have the following... -
Table sort
Hi I would like sort table. The table is createobject method (open a function and use SAP connection) and the table not use recordset. is it... -
Changing a html table when new data is entered into SQL table.
Hi all, I was wondering if anyone has any ideas on how I would go about this task. What I have is a html table which is populated from 2 different... -
Manuel Socarras #2
Re: Changing Sort criteria of DB table.
you just need one page. call it passing a URL parameter specifying the
field you want the recordset ordered by, retrieve it & in the SELECT
stament use it instead a fixed field name. for example:
yourpage.asp?sf=name
or
yourpage.asp?sf=town
<%
Dim sortedField
sortedField = CStr(Request.QueryString("sf"))
....
rsCustomers.Source = "SELECT * FROM YOUR_TABLE_NAME ORDER BY " & sortedField
....
%>
HTH,
manuel
juniorbee wrote:> hello
>
> whats the easiest way to change my recordsets sort criteria from say,
> alphabetical order to town name, am i best using sql (if so whats the code) or
> do i have to actually have to have two .asp pages with the different recordset
> criteria's??
>
>
> thanks
>
> jay
>
>
>Manuel Socarras Guest
-
juniorbee #3
Re: Changing Sort criteria of DB table.
sorry, i should have added that im using javascript rather than VBscript.
can you translate?
juniorbee Guest
-
Manuel Socarras #4
Re: Changing Sort criteria of DB table.
var sortedField
not sure now but toString should be equivalent to CStr
rsCustomers.Source = "SELECT * FROM YOUR_TABLE_NAME ORDER BY " + sortedField
juniorbee wrote:> sorry, i should have added that im using javascript rather than VBscript.
>
> can you translate?Manuel Socarras Guest



Reply With Quote

