Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to create listing record using alphabet

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-12-03, 09:31
zakyk zakyk is offline
Registered User
 
Join Date: Mar 2003
Posts: 32
Question how to create listing record using alphabet

hi,

i have no idea to create this code acctualy i have already done create db listing record using number for paging, but my user want listing record by alphabet. i think if i'm create every page from a - z does not efisiyen. so can u help me out.


thank
Reply With Quote
  #2 (permalink)  
Old 05-12-03, 12:39
Memnoch1207 Memnoch1207 is offline
Registered User
 
Join Date: Jan 2003
Location: Midwest
Posts: 138
do you mean you want to display the letters A - Z and have them as links (or something like that) so that when the user clicks on a letter, they see all records starting with that particular letter? if so you could do something like this

Code:
for a = 65 To 90 Response.write("<a href='somepage'>" & chr(a) & "</a>nbsp;nbsp") next

nbsp; should be with an & sign at the beginning, but it wouldn't display correctly in this post...so I took out the & sign so you would see that it needs to be there to have spaces between the characters.

It will look like this on the page mansiononmain.com/listings.asp

Last edited by Memnoch1207 : 05-12-03 at 12:54.
Reply With Quote
  #3 (permalink)  
Old 05-13-03, 10:33
zakyk zakyk is offline
Registered User
 
Join Date: Mar 2003
Posts: 32
ya..that right Memnoch1207. i'm still begineer to understand this code if your dont mind pls give me some more that related to database. i really respect for that..big thanks
Reply With Quote
  #4 (permalink)  
Old 05-13-03, 16:47
Memnoch1207 Memnoch1207 is offline
Registered User
 
Join Date: Jan 2003
Location: Midwest
Posts: 138
explain exactly what you are trying to accomplish...and i'll see what i can do to help you out.
Reply With Quote
  #5 (permalink)  
Old 05-15-03, 22:45
zakyk zakyk is offline
Registered User
 
Join Date: Mar 2003
Posts: 32
what is your example in mansiononmain.com/listings.asp is what i want to do. but i have no idea how to create paging after we lisiting the table then i just know to listing table just using do while command only, i really confuse for using for command, that why if you have completed code like example you give so it easy to me to come out. thanks for your concern
Reply With Quote
  #6 (permalink)  
Old 05-16-03, 05:13
rhs98 rhs98 is offline
Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 440
something like this?

Code:
for a = 65 To 90 Response.write("<a href=""" & request.querystring("url") & "?page=" & chr(a) &""">" & chr(a) & "</a>nbsp;|nbsp") next set conn=Server.CreateObject("ADODB.Connection") conn.Provider="your provider string" set rs = Server.CreateObject("ADODB.recordset") you need to change this select statement, putting in your own tables and column names rs.Open "Select * from {put your table name here} where {put your column name here} like '" & request.querystring("page") & "%'", conn if not(rs.bof) then do until rs.EOF you could remove this bit, it just lists all the fields in the RS for each x in rs.Fields Response.Write "<p>" & x.name & "<br />" & x.value & "</p>" next Response.Write "<br />" rs.MoveNext loop else response.write "Please select a letter" end if rs.close conn.close set rs=nothing set conn=nothing

Last edited by rhs98 : 05-16-03 at 05:19.
Reply With Quote
  #7 (permalink)  
Old 05-16-03, 18:43
Memnoch1207 Memnoch1207 is offline
Registered User
 
Join Date: Jan 2003
Location: Midwest
Posts: 138
I have attached a file that contains all the code (i think) you should need...It is the code from a site I created awhile back (http://usachambers.com/neosho/directory.asp)
Attached Files
File Type: zip directory.zip (2.3 KB, 116 views)
Reply With Quote
  #8 (permalink)  
Old 05-16-03, 18:47
Memnoch1207 Memnoch1207 is offline
Registered User
 
Join Date: Jan 2003
Location: Midwest
Posts: 138
BTW...I use a templating system...so you won't see any html code in the attachment above...It is all vbscript code.
Reply With Quote
  #9 (permalink)  
Old 05-18-03, 23:15
zakyk zakyk is offline
Registered User
 
Join Date: Mar 2003
Posts: 32
Talking

thank you,thank you all..it's work i'm using code where rhs98 manipulate from this first code Memnoch1207 giving. all the code i'm manipulate with html code. thanks rhs98 and big thanks Memnoch1207 your code 100% pure asp.
Reply With Quote
  #10 (permalink)  
Old 05-20-03, 17:54
rhs98 rhs98 is offline
Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 440
thats my job!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On