I have been trying to get the ad rotator to work for my site. I ahve tried to change some the constants and am unsure of the reason for the following error message. Any help would be greatly appreciated....<BR><BR>Server Object Error &#039ASP 0177 : 800a004c<BR>Server.CreateObject Failed<BR>/bannerad/banner.asp, line 35<BR><BR>which falls in at opening the text file, <BR><BR>&#060;%<BR>&#039You will need to include this file, banner.asp, into any files that<BR>&#039will be displaying banners. To randomly display a banner, you&#039ll<BR>&#039need only to issue the ASP command:<BR>&#039 ShowBanner<BR>&#039That&#039s it!! :)<BR>sub ShowBanner()<BR> &#039These are constants, don&#039t change the next 7 constants or you&#039ll be in<BR> &#039a world of pain!!<BR> Const bannerID = 0<BR> Const bannerCategory = 1<BR> Const bannerWeight = 2<BR> Const advertiserID = 3<BR> Const IMGSRC = 4<BR> Const Description = 5<BR> Const RedirURL = 6<BR> &#039********************************************* *****<BR> <BR> &#039OK, you WILL need to change this constant to reflect<BR> &#039the directory where your root directory is housed.<BR> &#039You&#039ll also need to create two subdirectories for<BR> &#039the directory listed below. These two subdirectories will<BR> &#039need to be named "clicks" and "clickthrus"<BR> Const path = "../bannerad/" <BR><BR> &#039We will use the FileSystemObject<BR> Dim fs, banFile<BR> Set fs = Server.CreateObject("Scripting.FileSystemObject")< BR><BR> &#039Open banners.txt for reading<BR> Set banFile = fs.OpenTextFile(path & "banners.txt",1)<BR><BR><BR> &#039Read the file:<BR> Dim str<BR> str = banFile.ReadAll<BR><BR> &#039 Close file<BR> banFile.Close<BR><BR><BR> &#039Now, split the string into records<BR> Dim records<BR> records = split(str,"*")<BR><BR><BR> Dim banInfo(), tempArray<BR> ReDim banInfo(UBound(records),7)<BR><BR> for i = LBound(records) to UBound(records)<BR> if right(records(i),1) = chr(10) then<BR> records(i) = left(records(i), len(records(i)) - 1)<BR> end if<BR> if left(records(i),1) = chr(10) then<BR> records(i) = right(records(i), len(records(i)) - 1)<BR> end if<BR><BR> tempArray = split(records(i),chr(10))<BR><BR> banInfo(i,bannerID) = tempArray(0)<BR> banInfo(i,bannerCategory) = tempArray(1)<BR> banInfo(i,bannerWeight) = tempArray(2)<BR> banInfo(i,advertiserID) = tempArray(3)<BR> banInfo(i,IMGSRC) = tempArray(4)<BR> banInfo(i,Description) = tempArray(5)<BR> banInfo(i,RedirURL) = tempArray(6)<BR> next<BR><BR> &#039Add up all the weights<BR> Dim total<BR> total = 0<BR><BR> for i = LBound(records) to UBound(records)<BR> total = total + CInt(banInfo(i,bannerWeight))<BR> next<BR><BR><BR> &#039Randomly pick a weight<BR> randomize<BR><BR> Dim randNum<BR> randNum = CInt(rnd * total) + 1<BR><BR> Dim count<BR> count = 0<BR> total = 0<BR><BR> for i = LBound(records) to UBound(records)<BR> total = total + banInfo(i,bannerWeight)<BR> if randNum &#060;= total then<BR> i = UBound(records)<BR> else<BR> count = count + 1<BR> end if<BR> next<BR><BR><BR> &#039Print out HREF and IMG<BR> Response.Write("&#060;CENTER&#062;&#060;A HREF=""../bannerad/adredir.asp?" & banInfo(count,bannerID) & """&#062;")<BR> Response.Write(vbCrLf & "&#060;IMG SRC=""" & banInfo(count,IMGSRC) & """ BORDER=1 ALT=""Please support out sponsors!""&#062;")<BR> Response.Write(vbCrLf & "&#060;/A&#062;&#060;/CENTER&#062;" & vbCrLf & vbCrLf)<BR><BR> &#039Update impression stats...<BR> Dim strPath<BR> strPath = path & "clicks\" & banInfo(count,bannerID) & ".txt"<BR><BR> Dim impressions<BR><BR> if fs.FileExists(strPath) then<BR> Set banFile = fs.OpenTextFile(strPath,1)<BR> impressions = CInt(banFile.ReadLine)<BR> else<BR> Set banFile = fs.CreateTextFile(strPath,True)<BR> impressions = 0<BR> end if<BR><BR> impressions = impressions + 1<BR><BR> banFile.close<BR><BR> Set banFile = fs.CreateTextFile(path & "clicks\" & banInfo(count,bannerID) & ".txt", True)<BR><BR> banFile.WriteLine(impressions)<BR> banFile.close<BR><BR> Set banFile = Nothing<BR> Set fs = Nothing <BR>end sub<BR>%&#062;