ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 6th, 2003, 12:54 PM
liew liew is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 1 liew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > online userlist problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway