Take a look at this:
int RoomId = dtChatRoom.Rows[currentRow].ItemArray["RoomID"].ToString();
You're calling ToString which results in a String which you're then assigning to an int. The compiler won't let you do this.
Instead, using (int) or Convert.ToInt32() to cast / convert a value to an integer.
How does the original source from the book look like?
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004