Click here to Skip to main content
16,014,568 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to set proxy Credentials to WebRequest ? [modified] Pin
Abhishek Chatterjee7-Aug-06 3:14
Abhishek Chatterjee7-Aug-06 3:14 
QuestionRadio on website Pin
hussainktm29-Jul-06 21:02
hussainktm29-Jul-06 21:02 
AnswerRe: Radio on website Pin
_AK_8-Aug-06 18:49
_AK_8-Aug-06 18:49 
QuestionPermalinks... How to with asp.net? Pin
cbmdk29-Jul-06 11:07
cbmdk29-Jul-06 11:07 
QuestionAccess the Profile in a WebService Pin
YossiKahlon29-Jul-06 10:24
YossiKahlon29-Jul-06 10:24 
QuestionConverting to PDF. Pin
deepaks329-Jul-06 8:14
deepaks329-Jul-06 8:14 
AnswerRe: Converting to PDF. Pin
Saifi Hasan29-Jul-06 21:37
Saifi Hasan29-Jul-06 21:37 
QuestionArray of custom classes problem [modified] Pin
LukeV29-Jul-06 7:15
LukeV29-Jul-06 7:15 
Hi!

I have an array of custom classes. When I try to set a variable with one of the array item, I get this error:

Microsoft VBScript runtime error '800a01a8'

Object required: '[undefined]'

I guess I'm not far off but I must be missing something. Here's my code ( Important lines are in bold ):


class CReviews
 private m_IDProd
 private m_aReviews
	
 public sub GetReviews(IDProd)
  i = 1
  m_IDProd = IDProd
  mySQL = "SELECT * FROM ProductReviews WHERE IDProd = " & IDProd & ";"
  set rs = conn.execute(mySQL)
		
  if not rs.eof then
   m_aReviews = Array( i )
   rs.movefirst
		
   do while not rs.eof
    ReDim m_aReviews( i )
				
    Set review = New CReview
    review.GetReview( rs("ID") )
    Set m_aReviews( i ) = review
				
    i = i + 1
    rs.movenext
   loop
  end if
 end sub
	
 public function GetReviewCount()
  GetReviewCount = UBound( m_aReviews )
 end function
	
 public function GetReview(nIndex)
  if nIndex > 0 AND nIndex <= GetReviewCount() then
   GetReview = m_aReviews( nIndex )
  else
   GetReview = nothing
  end if
 end function
end class


class CReview
 private m_ID
 private m_ReviewEn
	
 public sub GetReview(ID)
  'do stuff
 end sub
	
 public property Get ReviewEn()
  ReviewEn = m_ReviewEn
 end property
end class


sub GetReview(IDProd)
 Set reviews = New CReviews
 reviews.GetReviews( IDProd )
 response.Write( reviews.GetReviewCount() )
	
 'This line generates the error
 Set review = reviews.GetReview( 1 )
 if review <> nothing then
  response.Write( review.ReviewEn() )
 end if
end sub


Thanks!

Luc





-- modified at 13:21 Saturday 29th July, 2006
AnswerRe: Array of custom classes problem Pin
Ista3-Aug-06 8:44
Ista3-Aug-06 8:44 
GeneralRe: Array of custom classes problem Pin
LukeV4-Aug-06 4:37
LukeV4-Aug-06 4:37 
GeneralRe: Array of custom classes problem Pin
Ista4-Aug-06 4:39
Ista4-Aug-06 4:39 
GeneralRe: Array of custom classes problem Pin
LukeV4-Aug-06 5:26
LukeV4-Aug-06 5:26 
AnswerRe: Array of custom classes problem Pin
Ista4-Aug-06 6:22
Ista4-Aug-06 6:22 
Question(Really nobody knows...)How can i set the database password via AccessDataSource? [modified] Pin
m.rastgar29-Jul-06 3:58
m.rastgar29-Jul-06 3:58 
AnswerRe: (Really nobody knows...)How can i set the database password via AccessDataSource? Pin
minhpc_bk30-Jul-06 15:54
minhpc_bk30-Jul-06 15:54 
Question,Dynamic Image. [modified] Pin
deepaks329-Jul-06 3:16
deepaks329-Jul-06 3:16 
AnswerRe: ,Dynamic Image. Pin
enjoycrack29-Jul-06 5:29
enjoycrack29-Jul-06 5:29 
GeneralRe: ,Dynamic Image. Pin
deepaks329-Jul-06 6:11
deepaks329-Jul-06 6:11 
AnswerRe: ,Dynamic Image. Pin
enjoycrack29-Jul-06 6:16
enjoycrack29-Jul-06 6:16 
GeneralRe: ,Dynamic Image. Pin
deepaks329-Jul-06 7:51
deepaks329-Jul-06 7:51 
Questionshaped buttons in asp.net Pin
mamatha_raghu29-Jul-06 1:39
mamatha_raghu29-Jul-06 1:39 
AnswerRe: shaped buttons in asp.net Pin
dansoft29-Jul-06 4:23
dansoft29-Jul-06 4:23 
QuestionProblem in Deleting the file Pin
MudkiSekhon29-Jul-06 0:46
MudkiSekhon29-Jul-06 0:46 
AnswerRe: Problem in Deleting the file Pin
MHASSANF29-Jul-06 3:27
MHASSANF29-Jul-06 3:27 
AnswerRe: Problem in Deleting the file Pin
enjoycrack29-Jul-06 5:31
enjoycrack29-Jul-06 5:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.