Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Server object error 'ASP 0177
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Syko BA
Junior Member

United Kingdom
257 Posts

Posted - 09 April 2002 :  12:11:13  Show Profile  Visit Syko BA's Homepage
Frutzle

I have put your random quote into my inc_footer.asp and get the following error.

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/forum99/inc_footer.asp, line 74
Invalid class string

This is the code...

<% Set RandomContent = Server.CreateObject("MSWC.ContentRotator")
Response.Write RandomContent.ChooseContent("quotations.txt") %>


Do you have any idea what this could be

Thanks

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 09 April 2002 :  12:21:20  Show Profile
"Invalid class string" -- in other words the call to CreateObject failed because the name object cannot be found by the OLE sub-system.

didnt just cut 'n' paste honest

The name of the object you are trying to create was mispelled or is incorrect.
a permissions problem

I not sure if u need the response.write

Edited by - brother beyond on 09 April 2002 12:25:54
Go to Top of Page

Roland
Advanced Member

Netherlands
9335 Posts

Posted - 09 April 2002 :  13:04:14  Show Profile
The codes are correct, but it might be possible that the MSWC.ContentRotator isn't available on your server.

I got this code from GauravBhabu and don't know the specifics about it but if I were you I'd contact my host to ask them about it.



http://www.frutzle.com

Snitz Exchange | Do's and Dont's
Go to Top of Page

Syko BA
Junior Member

United Kingdom
257 Posts

Posted - 09 April 2002 :  13:39:22  Show Profile  Visit Syko BA's Homepage
brother beyond - Thank you for your comments.

FrutZle - I think you are right I have exactly the same code running on W2K and it works fine.

Thanks anyway.

Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 09 April 2002 :  14:26:49  Show Profile
I use this to get a random quote, it may be some help.



<%

Set MyFileObj = Server.CreateObject("Scripting.FileSystemObject"

countsFile = Server.MapPath ("quote") & "\quotes.txt"

Set MyTextFile = MyFileObj.OpenTextFile(countsFile, 1, false )


IF NOT MyTextFile.AtEndOfStream THEN
header = CInt(MyTextFile.ReadLine)
END IF


RANDOMIZE
LowestNumber = 1
HighestNumber = header

RandomValue = INT((HighestNumber-LowestNumber+1)*Rnd+LowestNumber)

Count=0

WHILE NOT MyTextFile.AtEndOfStream AND NOT Count = RandomValue
quote = MyTextFile.ReadLine
Count = Count + 1
WEND


MyTextFile.Closee


response.write("Random quote " & RandomValue & " of " & HighestNumber & quote)
%>



the top of the file is the total number of quotes, then 1 quote per line



Edited by - brother beyond on 09 April 2002 14:28:36
Go to Top of Page

Syko BA
Junior Member

United Kingdom
257 Posts

Posted - 09 April 2002 :  14:36:44  Show Profile  Visit Syko BA's Homepage
Thanks

brother beyond

I will try this when I get to work tomorrow.
I am running NT4 on the works web server



Edited by - Syko BA on 09 April 2002 14:38:15
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07