|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Just to give you the back ground info I am building a site using VBscript and using IBM Redback objects. I have are ready got a drop down menu to be populated by a redback object. But because some of the entries are entered more than once I would like to filter the results so each result is only shown once. <% Set oConn = GetConnectionObj() Set oLookup = Server.CreateObject("RedBack.RedObject") If Err.number Then DisplayError oLookup.Open oConn, "STOCK:ListStock" If Err.number Then DisplayError oLookup("select_criteria").Value = "INVEN.CATEG <> """"" Set rs = oLookup.CallMethod("Select") If Err.number then DisplayError Response.write"<select name=""vender"" id=""vender"">" Response.write"<option value=""""></option>" Do While Not rs.EOF Response.write LCase("<option value=" & rs("INVEN.CATEG").Value & ">" & rs("INVEN.DESCR") & "</option>") rs.Movenext loop Response.write"</select>" %> Thank you for taking the time to read this and hopefully help me. |
|
#2
|
|||
|
|||
|
There isn't any built in sorting/filtering ability in RedObject, nor is there one in the ADODB.Recordset... so you'll just have to filter manually, the old fashioned way =( You'll have to set up an array to track records that have already been printed and do a nested loop through that array etc etc
|
|
#3
|
||||
|
||||
|
I've got no idea what the IBM RedBack stuff is.. but, is there no keyword, or method to restrict items to only being shown once, similar to SQL's "DISTINCT" keyword.
|
|
#4
|
|||
|
|||
|
stumpy I checked out the docs on redback yesterday, and it's basically a 3rd party component to handle the business layer of your web apps. It doesn't appear to be very powerful though, like 3 objects and maybe 20 properties & methods between the 3 of them. I think the only purpose is to abstract your db info from your asp code.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Drop down Menus |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|