|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
online userlist problem
I have a instant messager and facing problem in online user list.
I think AllOnlineUserListStr is missing a record(I download the source code from a web site which asp code is missing).on SQLUser ="Select studid,userid,realname,sex,IsExit,image From [student] Order By studid Desc" RsUser.Open SQLUser,conn,1,1 While Not RsUser.EOF if RsUser("sex")=true then sGender=1 else sGender=2 AllOnlineUserListStr = AllOnlineUserListStr & sGender &"," AllOnlineUserListStr = AllOnlineUserListStr & RsUser("studid") &",'" AllOnlineUserListStr = AllOnlineUserListStr & RsUser("realname") &"'," RsUser.MoveNext Wend If AllOnlineUserListStr<>"" Then AllOnlineUserListStr=Left(AllOnlineUserListStr,Len (AllOnlineUserListStr)-1)RsUser.Close ************************************************** ****************** The actual list is: studid/realname --------------- 19/Name1 20/Name2 21/Name3 22/Name4 23/Name5 24/Name6 25/Name7 26/Name8 27/Name9 28/Name10 29/Name11 30/Name12 31/Name13 When in mode for WriteAllOnlineUserList(){Actually all of the mode facing same problem}, the online list become(Start reading from bottom): [B] 1 --> Mistake. studid=Name13 Realname=1 [B] 29 --> Mistake. studid=1 Realname=21 [B] Name10 --> OK. studid=28 [B] 2 --> Mistake. studid=2 Realname=Name9 [B] 25 --> Mistake. studid=2 Realname=25 [G] Name6 --> OK studid=24 [B] 2 --> Mistake. studid=Name5 Realname=2 [B] 21 --> Mistake. studid=1 Realname=21 [G] Name2 --> OK. studid=20 [B] undefined --> Mistake. studid=Name1 Realname=undefined Please take a look at the source code: URL or download required asp files and database here: URL |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > online userlist problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|