Ask a Question related to Dreamweaver AppDev, Design and Development.
-
tim-p #1
Sorting recordset with 'index' letters
Hi
I am trying to create a recordset where the results are sorted into
alphabetical order but also where an index letter is included at the top of
each new first letter's list:
ie.
A
Aardvark
Apple
Axe
B
Bee
Brain
Bus
C
Cat
Chair
Can anyone think how to do this?
Thanks for any suggestions!
TP
tim-p Guest
-
Accented letters in "export Recordset As XML"
Good Morning, i'm using "export Recordset As XML" i noticed that in the text strings inserted in the databse are used particular characters (in this... -
Sorting and subsorting recordset
DMX 2004 MSSQL 2000 ASP/vbScript I want to sort a by a field and then by another within that fielld. Sort by Model and sort models by year. i.e... -
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Hey Folks,(New to .NET) This is driving me NUTZ... If anyone out there can resolve this from me I would greatly appreciate it... Line 238: Line... -
RecordSet.Move or RecordSet.AbsolutePosition??
Hi, I'm trying to use either one of these methods to position the cursor in a specific position inside a recordset, but neither one seems to... -
Newb query: index.htm & index.php & the server default
The problem I'm trying to solve is as follows: The website has two subdirectories: /ordinary and /phpstuff. Users typing hostname/ordinary get the... -
Paul Whitham TMM #2
Re: Sorting recordset with 'index' letters
This is how you do it in ASP.
Firstly make sure that the you sort the recordset output in alphabetical
order. Then you would use the following code on the page
<%
Dim ThisLetter, TestLetter, TestName
ThisLetter = ""
%>
'Start of Repeat Region
TestName = recordset.fields.Item("NameField").value
TestLetter = Left(TestName,1)
If ThisLetter <> TestLetter then
response.write ("<p>") & TestLetter
ThisLetter = TestLetter
End if
Response.Write ("<br>") & TestName
'End of Repeat Region
Once you have positioned the code then wrap the areas denoted by the Start &
End Comments in a dreamweaver created repeat region
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"tim-p" <webforumsuser@macromedia.com> wrote in message
news:d5sv2t$gcf$1@forums.macromedia.com...of> Hi
>
> I am trying to create a recordset where the results are sorted into
> alphabetical order but also where an index letter is included at the top> each new first letter's list:
>
> ie.
> A
> Aardvark
> Apple
> Axe
>
> B
> Bee
> Brain
> Bus
>
> C
> Cat
> Chair
>
> Can anyone think how to do this?
>
> Thanks for any suggestions!
>
> TP
>
Paul Whitham TMM Guest
-
tim-p #3
Re: Sorting recordset with 'index' letters
Hi Paul
Works a treat!
Thank you very much for your help.
Tim P
tim-p Guest



Reply With Quote

