asp_web_howto thread: Special case records in a Selection Box
Message #1 by "Nathaniel Wiradi" <nathanaelbw@y...> on Thu, 13 Sep 2001 03:24:47
|
|
I want to put userlist records in a selection box, but the userlist record
is excluding the current user's name (Because he/she must not see his/her
name's on the selection box).
I use the SQL Server 7 databases.
Any help (coding preferred) would be appreciated.
Regards
Nathaniel
Message #2 by "Ken Schaefer" <ken@a...> on Fri, 14 Sep 2001 16:02:13 +1000
|
|
Why don't you do a
SELECT FROM table WHERE UserName <> 'CurrentUserName'
to populate the recordset. That way, the current user's name never makes it
into the recordset in the first place.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Nathaniel Wiradi" <nathanaelbw@y...>
Subject: [asp_web_howto] Special case records in a Selection Box
: I want to put userlist records in a selection box, but the userlist record
: is excluding the current user's name (Because he/she must not see his/her
: name's on the selection box).
: I use the SQL Server 7 databases.
: Any help (coding preferred) would be appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Nathaniel Wiradi" <nathanaelbw@y...> on Wed, 19 Sep 2001 02:35:12
|
|
I mean that i don't know how to put those recordset in the HTML tag :
<SELECT>
</SELECT>
Thank's anyway...
^_^
> Why don't you do a
>
> SELECT FROM table WHERE UserName <> 'CurrentUserName'
>
> to populate the recordset. That way, the current user's name never makes
it
> into the recordset in the first place.
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "Nathaniel Wiradi" <nathanaelbw@y...>
> Subject: [asp_web_howto] Special case records in a Selection Box
>
>
> : I want to put userlist records in a selection box, but the userlist
record
> : is excluding the current user's name (Because he/she must not see
his/her
> : name's on the selection box).
> : I use the SQL Server 7 databases.
> : Any help (coding preferred) would be appreciated.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
Message #4 by "Ken Schaefer" <ken@a...> on Wed, 19 Sep 2001 17:41:09 +1000
|
|
If not objRS.EOF then
Response.Write("<select>")
Do While Not objRS.EOF
Response.Write("<option value=""" & objRS("ID") & """>" &
objRS("Name") & "</option>")
objRS.moveNext
Loop
Response.Write("</select>")
End If
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: "Nathaniel Wiradi" <nathanaelbw@y...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, September 19, 2001 2:35 AM
Subject: [asp_web_howto] Re: Special case records in a Selection Box
: I mean that i don't know how to put those recordset in the HTML tag :
: <SELECT>
: </SELECT>
: Thank's anyway...
: ^_^
:
:
: > Why don't you do a
: >
: > SELECT FROM table WHERE UserName <> 'CurrentUserName'
: >
: > to populate the recordset. That way, the current user's name never makes
: it
: > into the recordset in the first place.
: >
: > Cheers
: > Ken
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: "Nathaniel Wiradi" <nathanaelbw@y...>
: > Subject: [asp_web_howto] Special case records in a Selection Box
: >
: >
: > : I want to put userlist records in a selection box, but the userlist
: record
: > : is excluding the current user's name (Because he/she must not see
: his/her
: > : name's on the selection box).
: > : I use the SQL Server 7 databases.
: > : Any help (coding preferred) would be appreciated.
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #5 by "Nathaniel Wiradi" <nathanaelbw@y...> on Thu, 20 Sep 2001 02:42:51
|
|
That's work, Thank's
Regards
Nathan
> If not objRS.EOF then
>
> Response.Write("<select>")
>
> Do While Not objRS.EOF
> Response.Write("<option value=""" & objRS("ID") & """>" &
> objRS("Name") & "</option>")
> objRS.moveNext
> Loop
>
> Response.Write("</select>")
>
> End If
>
> Cheers
> Ken
|